且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

html中td自动换行

更新时间:2022-06-20 03:29:13

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
table

{
 border-collapse: collapse;
 border: 1px black solid;
}

tr td

{
 border: 1px black solid;
 height: 20px;
 text-align:center;
}


</style>
</head>
<body>
<table width="500" rules="all" style="table-layout:fixed">
  <tr>
    <td width="200px" rowspan="2" style="word-wrap : break-word ">
  内容内容  内容内容  内容内容  内容内容  内容内容
 </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

 

效果图

html中td自动换行