取消类似问题的链接
Why can't I target the links in this class
我似乎无法将带有类的链接定位到另一个带有类的链接。
html。
<div class="tribe-events-cal-links">
<a class="tribe-events-gcal tribe-events-button" href="#" title="Add to Google Calendar">+ Google Calendar</a>
<a class="tribe-events-ical tribe-events-button" href="http://localhost/bcu/event/test/?ical=1&tribe_display=">+ iCal Import</a>
</div>
我希望能够display: none;
但我似乎无法定位到该特定链接。
我试过了。
tribe-events-ical >a {
display: none;
}
和所有变体,但我相信我做错了,我似乎找不到一个例子哦如何去做。
谢谢。
最佳答案
您需要检查您的 CSS 选择器。类是用前导 .
定义的,元素应该在它之前。
所以你的 CSS 应该是:
a.tribe-events-ical {
display: none;
}
关于html - 为什么我不能将此链接定位到类(class),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24462407/