一行有3个单元格,下面一行有2个单元格

时间:2016-02-17 21:43:10

标签: html html-table

我无法弄清楚如何使用colspan来完成这些行和单元格:

__________________________________________
|           ||             ||            |
|  CONTENT  ||  CONTENT    ||  CONTENT   |
==========================================
|                  ||                    |
|     CONTENT      ||       CONTENT      |
|                  ||                    |
------------------------------------------

1 个答案:

答案 0 :(得分:2)

table,
td {
  border: 1px solid #999;
}
<table>
  <tr>
    <td>CONTENT</td>
    <td colspan="2">CONTENT</td>
    <td>CONTENT</td>
  </tr>
  <tr>
    <td colspan="2">CONTENT</td>
    <td colspan="2">CONTENT</td>
  </tr>
</table>