【发布时间】:2023-03-02 22:24:01
【问题描述】:
我有一张桌子,里面有三个<td />。其中两个具有width 属性和0px 样式。
中间的<td /> 没有明确的width 集。
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="0" height="10" bgcolor="" style="background-color:#00ffff;height:10px;width:0px;"></td>
<td height="10" bgcolor="" style="background-color:#000;height:10px;"></td>
<td width="0" height="10" bgcolor="" style="background-color:#ff00ff;height:10px;width:0px;"></td>
</tr>
</tbody>
</table>
我希望这个中间的<td /> 会占据整个空间(这就是在 Firefox 和 IE 中发生的情况)
但是,在 Google Chrome 中,三个<td /> 都占用相同的空间。
1.这是为什么呢?
2. 这是 Chrome 的错误吗?
3. 有简单的解决方法吗?
【问题讨论】:
标签: html css google-chrome cross-browser