首页htmltdHTML Element Style - 如何在单元格中包装数据

HTML Element Style - 如何在单元格中包装数据

我们想知道如何在单元格中包装数据。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#nowrap td {
  width: 30px;
  white-space: nowrap;
}

#wrapped td {
  width: 30px;
}
</style>
</head>
<body>
  <table id="nowrap">
    <tr>
      <td>Some data</td>
    </tr>
  </table>
  <table id="wrapped">
    <tr>
      <td>Some data</td>
    </tr>
  </table>
</body>
</html>