HTML表 - 多个rowpans

时间:2013-04-26 20:48:11

标签: html html5 html-table tablerow

我想创建一个如下所示的表:

______________________________________________________________
|              |                |      Category1             |
|              |   Platform1    |____________________________|
|              |                |      Category2             |
|              |________________|____________________________|
|   Build      |                |      Category1             |
|              |                |____________________________|
|              |                |      Category2             |
|              |   Platform2    |____________________________|
|              |                |      Category3             |
|______________|________________|____________________________|

我写了一些代码,但我认为它不正确。由于我是HTML的新手,有人可以给我一些建议:

1 个答案:

答案 0 :(得分:4)

类似的东西:

<table width="200" border="1">
  <tr>
    <td rowspan="5">Build</td>
    <td rowspan="2">Platform1</td>
    <td>Category1 </td>
  </tr>
  <tr>
    <td>Category2 </td>
  </tr>
  <tr>
    <td rowspan="3">Platform2</td>
    <td>Category1 </td>
  </tr>
  <tr>
    <td>Category2 </td>
  </tr>
  <tr>
    <td>Category3</td>
  </tr>
</table>

JSFIDDLE