【发布时间】:2012-06-12 08:30:53
【问题描述】:
我对我发现的以下 css 有一些疑问:
html, body {
height:100%;
min-width:100%;
position:absolute;
}
html {
background: none repeat scroll 0 0 #fff;
color:#fff;
font-family:arial,helvetica,sans-serif;
font-size:15px;
}
- html 和 body 是否有必要将高度和最小宽度设置为 100%?有什么好处?
- 使用绝对位置的原因是什么?
- 为什么他们在 html 而不是 body 上设置背景/颜色/字体?有区别吗?还是只是偏好?
【问题讨论】: