是否可以创建一个适应浏览器大小并且可滚动的div?我想在div上使用overflow:auto
和90%
的百分比高度。
页面的结构如下:
<body style="height:100%">
<div id=header style="height:100%">headerinfo</div>
<div id=content style="height:100%;overflow:auto">content which is replaced dynamically</div>
</body>
在层级结构中没有已知的 px
高度时,overflow:auto
是否有效?