嗨我有两个具有相同类的div,所有这些我需要隐藏一个div锚标记。这是代码
.tribe-section.tribe-section-taxonomy.contactus:nth-child(n) {
display: none;
}

<div class="tribe-section tribe-section-taxonomy">
<a href="http://teknotrait.com/carrolltonalive/contact/" class="contactus">Contact us</a>
<h3>Event Categories</h3>
</div>
<div class="tribe-section tribe-section-taxonomy">
<a href="http://teknotrait.com/carrolltonalive/contact/" class="contactus">Contact us</a>
<h3>Event Tgas</h3>
</div>
&#13;
答案 0 :(得分:0)
.tribe-section.tribe-section-taxonomy:nth-child(4n) > .contactus {
display: block !important;
}
.tribe-section.tribe-section-taxonomy:nth-child(4n+1) > .contactus {
display: none !important;
}