使用css隐藏页面上的特定部分

时间:2017-11-06 11:51:22

标签: html css

嗨我有两个具有相同类的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;
&#13;
&#13;

1 个答案:

答案 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;
}