首页 > 解决方案 > 强制 TD 宽度,在 TBODY 内的 TR 内

问题描述

我有一个 html 模板:

table
  thead
    tr
      th
      th
      th
  tbody
    tr
      td
      td
      td

包含表格标题的 My th 具有属性:width="180"第一个和第二个,以及width="360"第三个。

我在 tr 下面的第三个 td 标记中有很长的文本,但是它溢出了很多。我该如何处理它,让我的列具有固定宽度(360)?我已经尝试了很多从其他主题中读到的东西,但没有任何效果:position: fixed, overflow: hidden等等,等等。

谢谢。

标签: htmlcsshtml-table

解决方案


推荐阅读