table不让td中文字溢出操作方法

xiaoxiao2021-02-28  111

table不让td中文字溢出操作方法

table{      width:100px;      table-layout:fixed;/* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */  }  td{      width:100%;      word-break:keep-all;/* 不换行 */         white-space:nowrap;/* 不换行 */      overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */      text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/  } 

转载请注明原文地址: https://www.6miu.com/read-63922.html

最新回复(0)