我有以下的标记:CSS特异性混乱
<div class="breadcrumbs">
<span id="links">
<a href="/home.html" class="pointer">home</a>
<span>></span>
<a href="/module/users.html">users</a>
</span>
</div>
我的风格是这样定义的:
.breadcrumbs{/*styles for breadcrumbs div*/}
.breadcrumbs span a{cursor:default/*other styles for breadcrumbs links*/}
a.pointer{cursor:pointer;}
在我的网页,这些链接显示默认光标(箭头)和风格a.pointer
显示在IE10控制台和萤火虫中出现。
我的困惑是,由于pointer
类直接应用于anchor元素,难道不应该重写从.breadcrumbs span a
中挑选出来的匹配吗?
查看http://specificity.keegan.st/,对于可视化特异性非常有用。 – robertklep