我有一個容器div。在這個div裏面是三個以700px間隔排列的圖表(容器的寬度)。這個想法是,其他2個圖將會隱藏起來,然後我可以使用jQuery在用戶與網頁上的各種控件交互時滑動。隱藏的CSS溢出
的我的代碼的簡化版本是像這樣:
樣式
#graphcontainer {
height: 260px;
overflow: hidden;
width: 700px;
}
.graph {
position: absolute;
}
HTML
<div id="graphcontainer">
<div class="graph" style="left: 0px;"></div>
<div class="graph" style="left: 700px;"></div>
<div class="graph" style="left: 1400px;"></div>
</div>
出於某種原因,第二和第三曲線圖,其被定位成偏離到右側,仍然可見!我如何確保他們不可見?
感謝這工作,也感謝jsfiddle鏈接它幫助 – Chris 2011-02-25 16:13:47
@Chris歡迎:) – Sotiris 2011-02-25 16:17:03