1.设置table固定布局,否则自适应布局会不受控制

table{

  table-layout: fixed;

}

2.设定td宽度占比

<table>
<col width="5%">
<col width="20%">
<col width="30%">
<col width="15%">
<col width="15%">
<col width="15%">
<thead>
</thead>
 
3.设置指定td文字过长省略号表示
table td.name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

相关文章:

  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-12-12
  • 2021-06-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2021-10-23
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
相关资源
相似解决方案