如何使td标签中过长的内容只显示为这个td的width的长度,之后的便以省略号代替。

table 中必须设置属性:

table-layout: fixed;

然后给 td 设置:

white-space:nowrap;
overflow:hidden;
text-overflow: ellipsis;

就可以实现了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-06-30
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2022-01-11
  • 2021-08-13
  • 2021-12-26
  • 2021-10-19
  • 2021-09-15
相关资源
相似解决方案