把body看作是一个容器,做为内部对象的上层标签,他的高度设置为100%是关键。
最基本的例子
* { margin:0; padding:0; border:0;}
html,body { height:100%;} /* 同时设置html是为了兼容FF */
#box_2 { height:100%; background:#000;}
html,body { height:100%;} /* 同时设置html是为了兼容FF */
#box_2 { height:100%; background:#000;}
|
上一篇:div+css布局漫谈 下一篇:CSS+DIV自适应高度布局 |

