【发布时间】:2013-05-29 11:15:28
【问题描述】:
在 CSS(不是 javascript)中,如何隐藏具有特定类的第一个元素,而不是其他元素?请参见下面的示例:
<div class="wrap">
<center>
<a href="" class="button">hide this one</a>
</center>
<div> Some other stuff</div>
<center>
<a href="" class="button">don't hide this one</a>
</center>
</div>
如何隐藏带有按钮类的 first 元素?
【问题讨论】:
-
向第一个元素添加一个类会更好。