这是我正在使用的代码:
- html,body{
- height: 100%;
- }
- div{
- min-height: 100%;
- height: auto !important;
- height: 100%; /* this is for older IE */
- }
这也失败了(但在Opera中有效):
- div{
- min-height: 100%;
- height: auto;
- }
所以100%的高度应该应用于所有div,直到html.但这只发生在第一个DIV