我有一组带样式的链接,使用:before
来应用箭头.
它在所有浏览器中看起来都很好,但是当我将下划线应用到链接时,我不希望在:before
部分(箭头)上有下划线.
参见jsfiddle,例如:http://jsfiddle.net/r42e5/1/
可以把这个go 掉吗?我与#test p a:hover:before
人坐在一起的测试风格确实得到了应用(根据Firebug的说法),但下划线仍然存在.
有什么办法可以避免这种情况吗?
#test {
color: #B2B2B2;
}
#test p a {
color: #B2B2B2;
text-decoration: none;
}
#test p a:hover {
text-decoration: underline;
}
#test p a:before {
color: #B2B2B2;
content: "► ";
text-decoration: none;
}
#test p a:hover:before {
text-decoration: none;
}
<div id="test">
<p><a href="#">A link</a></p>
<p><a href="#">Another link</a></p>
</div>