我有一个包含多行和2列的表格。当使用
CSS:
我可以使用
#highlight:target
时,我希望整个表格行的背景色变化。我已经能够使用<td id="highlight">
使单个单元格更改颜色,但不能在<tr id="highlight">
上实现。CSS:
#highlight:target {
background-color: #FF9900;
-webkit-transition: all 1s linear;
}
HTML:
<a href="#highlight">Highlight!!</a>
<table>
<tr id="highlight">
<td>First Column</td>
<td>Second Column</td>
</tr>
</table>
我可以使用
:target
选择器更改整个行的背景颜色吗?
<td>...</th>
- Stickers