【发布时间】:2012-04-30 12:53:45
【问题描述】:
有没有办法限制/约束<colgroup>/<col> HTML 标签中定义的样式的“操作”字段。
给定下表:
<table>
<colgroup>
<col align="center" />
<col align="center" style="background-color: lightgrey;" />
<col align="center" />
</colgroup>
<thead>
<tr>
<th>Column A</th>
<th>Column B</th>
<th>Column C</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.a</td>
<td>1.b</td>
<td>1.c</td>
</tr>
<tr>
<td>2.a</td>
<td>2.b</td>
<td>2.c</td>
</tr>
</tbody>
</table>
我希望background-color: lightgrey; 不应用于“B 列”单元格(thead 中的第二个th)。
【问题讨论】: