溢出显示省略号相关 1.antd table 2.列表通过样式修改

antd

width: "30%"/30,
ellipsis: true-------主要是这个

通过样式修改列

table {
  width: 100%;
  table-layout:fixed;
}

注意:table必须设置 table-layout:fixed; ,文字溢出省略才能生效

td {
  width: 100px;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

主要是后三句

参考:https://zhuanlan.zhihu.com/p/378633815

posted @ 2022-09-27 18:07  zongkm  阅读(207)  评论(0)    收藏  举报