DDSkay

针对 table 换行问题, table 必备CSS为 table-layout:fixed; td的 word-wrap: break-word; 

 

而且 td table 的宽度都是固定的才可以;

 

针对 table 中 td 的 border 合并 table 的css 为 border-collapse: collapse;

 

table {
 TABLE-LAYOUT: fixed;
border-collapse: collapse
}
td{
WORD-WRAP: break-word

border="1"


}

<
table cellspacing="0" cellpadding="0" width="200"> <tbody> <tr> <td width="20">sssssssssssssssssssssssssssssssssssssssssssssss </td> <td>aaaaa</td> </tr> <tr> <td width="20">sssssssssssssssssssssssssssssssssssssssssssssss </td> <td>aaaaa</td> </tr> </tbody> </table>

 

分类:

技术点:

相关文章:

  • 2021-10-12
  • 2021-11-02
  • 2021-11-02
  • 2021-11-21
  • 2021-07-14
  • 2021-12-27
猜你喜欢
  • 2021-12-29
  • 2021-11-02
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
相关资源
相似解决方案