设想:
我有一个包含表头的父 div 和一个包含表数据的子 div。
目标:
我希望能够水平滚动,从左到右滚动所有内容,如果表格数据垂直溢出,我希望能够垂直滚动并查看标题。
问题:
如果表格数据垂直溢出并且宽度超过父容器,除非我滚动,否则我看不到垂直滚动条,因此标题。
我在这里设置了一个示例:http: //jsfiddle.net/uRHkU/2/ - 我想要实现的目标是什么?
<div class="parentDiv">
<p>very very very long header</p>
<div class="childDiv">
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
<p>content that stretches the full width</p>
</div>
</div>