我已将<td>
替换为<custom-tag>
,然后在我的CSS中custom-tag { display: table-cell; }
,但Chrome和Firefox似乎都从表中删除了该元素。 显示有什么好处:如果不是这样的表格单元格
<table>
<tr>
<span style="display:table-cell"></span>
<span style="display:table-cell"></span>
<span style="display:table-cell"></span>
</tr>
</table>
不使用<td>
的原因是我想实现一个Can.js组件。但这不是重点。
答案 0 :(得分:2)
也许相反:
<div style="display: table;">
<div style="display: table-row;">
<span style="display:table-cell"></span>
<span style="display:table-cell"></span>
<span style="display:table-cell"></span>
</div>
</div>