13
THEAD我有一個使用thead
和tbody
一個table
。 table
已設置border-spacing
,並在Chrome和Safari之間的空間爲,標題行和,其餘加倍。雙邊框間距在Chrome和Safari
據報道爲issue for Chrome去年年底,但是這是唯一的參考這個我能找到。
有沒有其他人有這個,或知道如何解決它?
<table style="border-spacing: 0 5px">
<thead>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
<th>Heading 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
</tbody>
它顯示爲預期的(所有的行相等間隔)在Firefox,不知道IE。
接近
這真的好像是Webkit中的一個bug。你需要包含'thead'和'tbody'標籤嗎? – 2010-10-08 16:09:16
@dark_charlie - 通常認爲指定add和tbody會好得多 - 如果開發人員稍後要回到代碼中,那麼它比標記爲
回答
thead th {position:relative;上圖:5像素;}將做到這一點
來源
2012-01-05 11:25:16 deiwi
這不正是「THE」解決方案,但你可能想看看這裏已經與我的具體情況制定一個解決辦法:
How to remove extra border spacing between TBODY elements?
來源
2013-02-12 23:45:59 wrygiel
相關問題