13
我想將背景顏色應用於COLGROUP,但僅限於表格的TBODY。給定一個典型的日曆表,其結構如下所示:CSS選擇器將樣式應用於COLGROUP,但僅限於TBODY(不是THEAD)中?
<table>
<colgroup class="weekdays" span="5"/>
<colgroup class="weekend" span="2"/>
<thead>
<tr>
<td/><td/><td/><td/><td/>
<!-- I'd like the columns of the following two cells to be untouched. -->
<td/><td/>
</tr>
</thead>
<tbody>
<tr>
<td/><td/><td/><td/><td/>
<!-- I'd like selector to apply the style only to the columns of the following two cells -->
<td/><td/>
</tr>
...
</tbody>
</table>
是否有一個CSS選擇器(或類似的東西),它可以讓我申請不同的風格在THEAD和TBODY的「週末」 COLGROUP?
好的,謝謝你的信息! – Manne 2009-11-16 12:56:32