HTML代码
<table>
<tr>
<td>Data</td>
<td>Table表格中td单元格内容超出时隐藏</td>
<td>Data</td>
</tr>
</table>
CSS代码
table {
width: 100%;
table-layout: fixed;
border: 1px solid black;
} td:first-child,td:last-child{
width: 50px;
} td:nth-child(2) {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
最终结果