出于某种原因,我无法让该表接受行跨度。
我没试过多少。
<table style="border: 3px solid black; width:95%">
<caption>This is a caption, looks a lot like a
title</caption>
<colspan>
<col style="background-color:aquamarine">
<col style="background-color:crimson">
<col style="background-color:aquamarine">
</colspan>
<thead>
<tr>
<th colspan="2">This is a colspan.</th>
<th rowspan="3">rowspan</th>
</tr>
</thead>
<tbody>
<tr>
<td>Test1</td>
<td>Test2</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Test3</td>
<td>Test4</td>
</tr>
</tfoot>
</table>
我希望 rowspan="3"正常工作。
最佳答案
如果我对问题的理解正确,您希望包含标题的行具有 rowspan。
<table style="border: 3px solid black; width:95%">
<caption>This is a caption, looks a lot like a
title</caption>
<colspan>
<col style="background-color:aquamarine">
<col style="background-color:crimson">
<col style="background-color:aquamarine">
</colspan>
<tbody>
<tr>
<th colspan="2">This is a colspan.</th>
<th rowspan="3">rowspan</th>
</tr>
<tr>
<td>Test1</td>
<td>Test2</td>
</tr>
<tr>
<td>Test3</td>
<td>Test4</td>
</tr>
</tbody>
</table>
这是您所期望的吗?
关于html - Rowspan 无法正常工作,我该怎么做才能实现这一目标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57175653/