Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
h1 a, h2 a, h3 a, { color: #ccc !important; }
这段代码不起作用,它不会覆盖我在 A 标签中设置的颜色。我已经使用了重要的。
如何覆盖 A 标签中的颜色?
header a { color:# 000; }
这段代码虽然有效....
用这个:
h1 a, h2 a, h3 a { color: #ccc !important; }
最后一行的代码中有一个额外的逗号。