最佳答案
我需要在 CSS 中使用属性选择器来改变不同颜色和图像的链接,但它不工作。
我有这个 html:
<a href="/manual.pdf">A PDF File</a>
还有这个 CSS:
a {
display: block;
height: 25px;
padding-left: 25px;
color:#333;
font: bold 15px Tahoma;
text-decoration: none;
}
a[href='.pdf'] { background: red; }
为什么背景不是红色的?