这是我的导航中的链接之一:
<li><a href="#live-now" class="navBtn"><span id="navLiveNow" class="white innerShadow textShadow">Live Now</span></a></li>
我的 CSS 中还有以下内容:
a { text-decoration: none; }
a:visited { text-decoration: none; }
a:hover { text-decoration: none; }
a:focus { text-decoration: none; }
a:hover, a:active { text-decoration: none; }
但链接仍然显示在可怕的蓝色/紫色访问/hover html 默认值中。我做错了什么?
最佳答案
您需要覆盖颜色:
a { color:red } /* Globally */
/* Each state */
a:visited { text-decoration: none; color:red; }
a:hover { text-decoration: none; color:blue; }
a:focus { text-decoration: none; color:yellow; }
a:hover, a:active { text-decoration: none; color:black }
关于html - 蓝色和紫色默认链接,如何删除?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10312857/