首先为table添加如下样式:
style="table-layout:fixed;
其次为td添加如下样式:
" style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
详细如下所示:
<table style="table-layout:fixed;">
<thead><th >标题</th>
<th >内容</th>
<th >创建时间</th>
<th >提交人</th>
</thead>
<c:forEach var="fileInfo" items="${result}" varStatus="vs">
<tr ${vs.index%2 eq 1?"class='coler'":""}>
<td width="20%">0000000</td>
<td width="150px" style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">111111</td>
<td width="15%">222222222</td>
<td width="15%">3333333333333333</td>
</tr>
</c:forEach>
</table>