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.
我正在编辑 wordpress 的 style.css
我想用白色显示一个超链接,即
<a class="viewall" href="/">View All</a> .viewall { color: #ffffff; }
但它仍然显示黑色的超链接,因为它是从上面定义的 css 继承的。如何克服这个问题?
您还需要包含“已访问”的样式。
a.viewall, a.viewall:visited { color: #ffffff; }
更多阅读——包括未访问、已访问、悬停和活动链接的样式。
尝试将 !important 添加到您的 CSS 样式中:
.viewall { color: #ffffff !important; }