合作联系微信: w6668263      合作联系电话:177-9238-7426     

table 中,如何使得单元格的内容不换行,单元格不被撑开

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>table-layout:fixed</title>
<style type="text/css">
.dataTable { width: 100%; border: none; border-collapse: collapse; border-spacing: 0px !important; display: table; table-layout:fixed; }
.dataTable td { word-break: break-all; word-wrap:break-word; }
</style>
</head>

<body>
<table class="dataTable" border="1">
  <tr>
    <td width="120" align="center">阿罗裤剪短发了</td>
    <td width="40%">&nbsp;</td>
    <td width="120" align="center">&nbsp;</td>
    <td width="40%">&nbsp;</td>
  </tr>
  <tr>
    <td align="center">阿罗裤剪短发了</td>
    <td>&nbsp;</td>
    <td align="center">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
    <td>&nbsp;</td>
    <td align="center">阿罗裤剪短发了</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
    <td>&nbsp;</td>
    <td align="center">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

 

posted on 2016-02-03 14:51  草率的龙果果  阅读(3219)  评论(0编辑  收藏  举报

导航