请参阅以下网址以获取我的示例。
http://wiredbeast.com/bordermenu/test.html
代码:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div style="position:absolute;top:0;right:0;left:0;bottom:0;background:green;overflow-y: auto;">
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<p>overflowing content</p>
<div style="position:absolute;top:0;right:0;width:227px;bottom:0;background:red;"></div>
</div>
</body>
</html>
基本上,当我缩小窗口以激活绿色容器上的溢出时,红色侧边栏不会一直向下延伸。即使溢出,我怎样才能让侧边栏跨越其父级的整个高度?