【发布时间】:2011-05-30 17:29:35
【问题描述】:
我正在尝试实现类似于带有标题和可滚动内容区域的常规窗口窗口。 .frame 会缩小以适应其可变大小的内容,并且仅受 max-width/max-height 的限制:
<div class="frame">
<div class="title">title</div>
<div class="content scrollable">content of variable width/height</div>
</div>
所以,基本上,没有设置外部width/height,.frame width/height 仅受max-width、max-height 的限制,除了.frame 缩小以适应其内容。
结果看起来就像一个带有标题栏和变量 width/height 内容的常规 Windows 窗口,如果框架的 height/width 超过某些最大值,它应该滚动。
如何在 CSS 中完成?
【问题讨论】:
标签: html css scroll containers