Table Tr TD的自动换行
 1         <style type="text/css">
 2             table {
 3                 width: 30em;
 4                 table-layout: fixed; /* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
 5             }
 6 
 7                 table td {
 8                     width: 100%;
 9                     word-break: keep-all; /* 不换行 */
10                     white-space: nowrap; /* 不换行 */
11                     overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
12                     text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
13                 }
14         </style>
View Code

相关文章:

  • 2022-12-23
  • 2021-08-02
  • 2021-12-27
  • 2021-10-16
  • 2022-02-06
  • 2021-07-26
  • 2022-01-11
猜你喜欢
  • 2021-06-23
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案