好的,我有点坚持这个,似乎无法弄清楚!
因此,我正在寻找一种类似的解决方案,Apple 在展示产品规格时会使用该解决方案。
我想要实现的是你有两个 div,每个 div 都占用了浏览器的全部空间!
所以你会有
<--div1--> 浏览器全宽高,这里设置100%没问题<--div-->
然后第二个 div 不够整洁
<--div2--> 用户使用了它的滚轮并且异常地捕捉到这个也是浏览器的全尺寸的div!这有多可行?<--div-->
希望这是有道理的:)
我被要求提供一些代码:
所以我猜HTML是:
<div id="contentOne">
Just some content
</div>
<div id="contentTWO">
Just some other content
</div>
然后是 CSS
html {
min-height:100%
}
body {
height:100%
#ContentOne {
min-height:100%;
}
#ContentTwo {
min-height:100%; !--well this doesn't work--!
}
希望这现在有意义!