如何使用HTML和CSS创建类似上面示例的表格。我尝试过以下方法:
<table>
<tr>
<th>XXX</th>
<th>XXX</th>
</tr>
<tr>
<td>XXX</td>
<td>XXX</td>
</tr>
<tr>
<td>XXX</td>
<td>XXX</td>
</tr>
<tr>
<td>XXX</td>
<td>XXX</td>
</tr>
</table>
但它不起作用。有人可以帮忙吗?
答案 0 :(得分:2)
像这样的东西
<table border="1" cellpadding="10" cellspacing="0" style="width:100%">
<tr>
<td style="width:50%"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td rowspan="2"> </td>
<td> </td>
<td rowspan="2"> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td rowspan="2"> </td>
<td> </td>
<td rowspan="2"> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
</table>
答案 1 :(得分:0)
<table>
<tr>
<th colspan="2">XXX</th>
<th colspan="2">XXX</th>
</tr>
<tr>
<td colspan="2">XXX</td>
<td colspan="2">XXX</td>
</tr>
<tr>
<td colspan="2">XXX</td>
<td rowspan="2">XXX</td>
</tr>
<tr>
<td colspan="2">XXX</td>
<td>XXX</td>
</tr>
<tr>
<td colspan="2">XXX</td>
<td rowspan="2">XXX</td>
</tr>
<tr>
<td>XXX</td>
<td>XXX</td>
</tr>
<tr>
<td colspan="2">XXX</td>
<td rowspan="2">XXX</td>
</tr>