First, you need to set the table-layout:fixed in the table;
<table style="table-layout:fixed"></table>
Then set the width of each column in the table header th
<table style="table-layout:fixed"><th width="10%" >title01</th><th width="20%">Title02</th><!-- other th- -></table>
Then add a style to the TD that is represented by an ellipsis when the length is greater than a certain number
<table style="table-layout:fixed"><th width="10%">title01</th><th width="20%">Title02</th><!--other th--><c:foreachItems ="" var=""Varstatus =""><TD><TITLE01</TD><TD style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"><title02</td><!--other TD--></c:foreach></table>
Bootstrap need to be set to th when table size is set, otherwise it may not take effect, the above is available in bootstrap
When not using bootstrap can use the following style, online search, more useful
<! DOCTYPE HTML Public"-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD"> "Text/css">. mytable {Table-layout:fixed; Width:98%border:0px; margin:0px; }. mytable tr td {Text-overflow:ellipsis;/*For IE*/-moz-text-overflow:ellipsis;/*For Firefox,mozilla*/Overflow:hidden; White-Space:nowrap; BORDER:1PX solid; Text-Align:left}</style> "500px" class="mytable"> <tr> <td width="20%"> Don't Kangqiao </td> <td width="80%">softly I walked, as I softly came, I waved a wave of sleeves, without taking a piece of cloud</td> </tr> </table> </body> The Css,bootstrap table controls the use of ellipses when the TD content is too long, and an ellipsis when the bootstrap is not used