當我嘗試下面的代碼,隱藏溢出不起作用(它擴展):溢出:隱藏不表內工作
<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1024" height="100" colspan="3"> </td>
</tr>
<tr><td width="1024">
<div style="width:1024;height:436;overflow:hidden;">
<div style="position:absolute;">
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td width="51"><img src="images/page1_04.jpg" width="51" height="436" /></td>
<td width="922" height="437"><img src="images/page1_05.jpg" width="922" height="436" /></td>
<td width="51"><img src="images/page1_06.jpg" width="51" height="436" onMouseOver="this.src='images/hover/page1_arrow_hover_06.jpg'" onMouseOut="this.src='images/page1_06.jpg'" /></td>
<td width="300"><img src="images/page2_05.jpg" /></td>
<td width="51"><img src="images/page2_04.jpg" width="51" height="436" onMouseOver="this.src='images/hover/page2_arrow_hover_04.jpg'" onMouseOut="this.src='images/page2_04.jpg'" /></td>
<td width="922" height="437"><img src="images/page2_05.jpg" width="922" height="436" /></td>
<td width="51"><img src="images/page2_06.jpg" width="51" height="436" /></td>
</tr></table>
</div>
</div>
</td>
</tr>
</table>
然而,當我只使用代碼的片段(父div)它工作正常。
我在做什麼錯?
謝謝你, 馬克。
你所做的內部DIV是'absolute',這意味着它不再由公文流轉,或其父div的寬度/高度設置的約束。 – 2012-01-30 22:12:28