1.設置table固定布局,否則自適應布局會不受控制
table{
table-layout: fixed;
}
2.設定td寬度占比
<table>
<col width="5%">
<col width="20%">
<col width="30%">
<col width="15%">
<col width="15%">
<col width="15%">
<thead>
</thead>
3.設置指定td文字過長省略號表示
table td.name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}