给定两个表示嵌入在更大的div中的列的div。如果"!stuff"的html表示许多行数据,超过了容器的高度,我该如何设置它,以便两个col div将溢出并共享来自"container"的一个滚动条?
.container { height: 100%; width: 100%; overflow-x: hidden; overflow-y: scroll; position: relative; padding-bottom: 30px; }
.col1 { height: 100%; width: 50%; overflow-x: hidden; overflow-y: visible; position: relative; float: left; }
.col2 { height: 100%; width: 50%; overflow-x: hidden; overflow-y: visible; position: relative; float: right; }
<div class="container">
<div class="col1">
!Stuff<br/>
</div>
<div class="col2">
!Stuff
</div>
</div>