表格超出部分隐藏

<html>
<head>
<style type="text/css">
td{
white-space:nowrap;text-overflow: ellipsis;overflow: hidden;
}
</style>
</head>
<body>
<table width="350px" border="1" cellspacing="0" cellpadding="0" style="table-layout:fixed;">

<colgroup>
<col style=" 10%;"></col>
<col style=" 10%;"></col>
<col style=" 10%;"></col>
<col style=" 10%;"></col>
<col style=" 10%;"></col>
<col style=" 10%;"></col>
<col style=" 10%;"></col>
<col style=" 10%;"></col>
<col style=" 10%;"></col>

<!--可以用来分配列宽-->
</colgroup>


<tr>
<td width="200">注意:表格必须要设置宽度</td>
<td style="">超长的不希望换行而希望能自动隐藏的内容,超长的不希望换行而希望能自动隐藏的内容</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

原文地址:https://www.cnblogs.com/HeShui/p/3899286.html