HeShui

表格超出部分隐藏

2014-08-08 14:27  河水  阅读(640)  评论(0编辑  收藏  举报

<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="width: 10%;"></col>
<col style="width: 10%;"></col>
<col style="width: 10%;"></col>
<col style="width: 10%;"></col>
<col style="width: 10%;"></col>
<col style="width: 10%;"></col>
<col style="width: 10%;"></col>
<col style="width: 10%;"></col>
<col style="width: 10%;"></col>

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


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

分类:

技术点:

相关文章:

  • 2021-12-29
  • 2021-12-25
  • 2021-12-29
  • 2021-12-02
  • 2021-10-19
  • 2021-12-02
  • 2021-11-18
  • 2021-10-10
猜你喜欢
  • 2021-12-26
  • 2021-09-29
  • 2021-12-23
  • 2021-09-07
  • 2021-11-15
  • 2021-12-29
相关资源
相似解决方案