場景:控制子容器滾動
我有一個包含表頭和包含表數據的子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>
沒有工作,如果我垂直滾動,標題是看不見的。 http://jsfiddle.net/uRHkU/4/ – user1883004 2013-02-28 14:09:48
啊,我明白了。那這個呢? http://jsfiddle.net/Merec/uRHkU/6/ – Merec 2013-02-28 14:12:31
仍然缺少一點 - 「如果表格數據垂直溢出,並且寬度超過父容器,我看不到垂直滾動條,除非我滾動」 – user1883004 2013-02-28 14:19:30