【发布时间】:2013-06-08 06:01:05
【问题描述】:
是否可以创建一个可以根据浏览器大小调整并且可以滚动的 div?
我想在90%的div和百分比高度上使用overflow:auto。
页面的结构是
<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>
overflow:auto 在层次结构中的某处没有已知的px 高度是否可以工作?
【问题讨论】:
-
我很惊讶! id=header 有效! (不带引号)。 DOM 标签可以用作 ID 似乎很疯狂……
标签: html scroll height overflow percentage