我無法讓div滾動誰的父容器絕對定位。在絕對定位的div內滾動div
http://codepen.io/establish/pen/zdFaL
HTML
<div class="container">
<div class="stream page">
<div class="stream-content">
<h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut odio libero, posuere in tortor quis, malesuada ullamcorper ante. Morbi sed orci nisi.</h2>
</div>
</div>
<div class="detail page">
</div>
</div>
CSS
.container {
background-color: pink;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
.page {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.detail {
background-color: blue;
left: 425px;
}
.stream {
background-color: green;
width: 425px;
}
.stream-content { overflow-y: scroll }
我想你只需要一個'height'增加您的.container,.page和.stream內容元素 – Pattle