【发布时间】:2012-01-05 04:01:15
【问题描述】:
有一个有效的 css 规则(jquery 仅作为最后机会)允许定义表的所有 td 的样式,只有当有第 th 行时。
更具体
<table>
<tr>
<td>
STYLE 1 HERE, my background color is white
</td>
</tr>
</table>
<table>
<tr>
<th>
some text
</th>
</tr>
<tr>
<td>
STYLE 2 HERE, my table has TH, my background color is red
</td>
</tr>
</table>
CSS:
th, td {
background-color:#ffffff
}
?????? {
background-color:#ff0000
}
有办法吗?
提前致谢, 西乔帕斯
【问题讨论】:
标签: html css css-selectors