CSS部分:
table{
table-layout:fixed;
width:100%;
height:32px;
border-collapse:collapse;
}
table td{
border:1px solid #5a5858;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.box{
width:400px;
height:200px;
}
HTML部分:
<div class="box">
<table>
<tr>
<td>1111</td>
<td>5555555555555555555456464645646464646</td>
</tr>
</table>
</div>