<table>
<thead>
<tr>
<th colspan="2">Column one and two</th>
<th>Column three</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2" colspan="2">A large cell</td>
<td>a smaller cell</td>
</tr>
<tr>
<!-- note that this row only has _one_ td, since the preceding row
takes up some of this row -->
<td>Another small cell</td>
</tr>
</tbody>
</table>
這是方法
回答
在你不熟悉
colspan
實現,我認爲你也不熟rowspan
,所以我想我會扔在免費的。一個重要的一點要注意,使用
rowspan
時:以下tr
元素必須包含因爲以前的行(或以前行)使用rowspan
細胞較少td
元素。CSS:
HTML:
演示於:jsbin
來源
2010-10-01 11:04:27
這是我討論過的HTML表格中最*熱情的*,以及我聽過的熱情迴應...... =) – 2010-10-01 11:17:06
發現這個演示內容非常豐富:http://www.w3schools.com/tags/ tryit.asp?文件名= tryhtml_table_span – unmircea 2014-09-26 14:33:40
是的,只需使用colspan即可。
來源
2010-10-01 10:55:10 oezi
colspan屬性:
來源
2010-10-01 11:03:17 Nivas
相關問題