Sample fail lol如何在2行中遍歷所有th/td?
但我要的是有第一thead tr
跨越未來tr
這在例子是空的跨越。 有什麼建議嗎?
我基本上想要一個標題行,它是的兩倍正常行的高度(動態)。
Sample fail lol如何在2行中遍歷所有th/td?
但我要的是有第一thead tr
跨越未來tr
這在例子是空的跨越。 有什麼建議嗎?
我基本上想要一個標題行,它是的兩倍正常行的高度(動態)。
您正在使用行跨度=「2正確「 檢查你的代碼很少修改:
<table>
<thead>
<tr>
<th rowspan="2">header 1</th>
<th rowspan="2">header 2</th>
<th rowspan="2">header 3</th>
<th>header 4</th>
</tr>
<tr>
<th>header 5</th>
</tr>
</thead>
<tbody>enter code here
</tbody>
在您例如第一<tr>
沒有任何高度,使日行跨度有沒有明顯的效果......
我想你需要添加borderspacing = '0' 表像這樣
<table cellspacing='0'>
<thead>
<tr>
<th rowspan="2">header 1</th>
<th rowspan="2">header 2</th>
<th rowspan="2">header 3</th>
</tr>
<tr>
</tr>
</thead>
<tbody>
</tbody>
</table>
和CSS:
th, td {
border: 1px solid blue;
height: 20px;
}
定義 –
「的標準行的高度」當你說你想要的每列行跨越下一行的相應列意味着,你實際上意味着你只需要一行。有人可以幫助我在這裏沒有正確解釋嗎? :( – Prash