溢出:滚动;在 中
为什么 CSS 属性overflow:scroll; 不工作于<td> , while overflow:hidden; 效果很好?
<table border="1" style="table-layout:fixed; width:100px">
<tr>
<td style="overflow:scroll; width:50px;">10000000000000000000000000000000000</td>
<td>200</td>
<td>300</td>
</tr>
</table>
From the CSS specs1 http://www.w3.org/TR/CSS2/visufx.html#overflow,2 http://www.w3.org/TR/CSS2/tables.html#fixed-table-layout, I can't see why.
你必须将它包装在一个 div 中,这样才可以工作:
<table border="1" style="table-layout:fixed; width:500px">
<tr>
<td style="width:100px;"><div style="overflow:scroll; width:100%">10000000000000000000000000000000000</div></td>
<td>200</td>
<td>300</td>
</tr>
</table>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)
|