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