具有固定宽度的HTML表格中的两级行<;thead>;?
我有一个具有固定宽度列的表:具有固定宽度的HTML表格中的两级行<;thead>;?,html,css,html-table,Html,Css,Html Table,我有一个具有固定宽度列的表: <table width="100%" cellpadding="0" cellspacing="0"> <thead> <tr> <th>Title</th> <th>Description</th> <th>Hours</th> <
<table width="100%" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Title</th>
<th>Description</th>
<th>Hours</th>
<th>Rate</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:100px"></td>
...
</tbody>
</table>
标题
描述
小时
比率
...
这很好,但现在我想让描述出现在“标题、小时数、费率”下面的一行,这样它可以更长,可能是表格的宽度。大概是这样的:
| Title | Hours | Rate |
------------------------------------------
| A title | Some hours | A rate | <- This is a row
| A long description would go here... | <- This is the same row
------------------------------------------
So on...
|标题|小时|费率|
------------------------------------------
|一个标题|几个小时|一个速率|Colspan会做你想让它做的事
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="4">long description</td>
</tr>
长描述
Colspan将执行您希望它执行的操作
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="4">long description</td>
</tr>
长描述