html - 蓝色和紫色默认链接,如何删除?

标签 html css

这是我的导航中的链接之一:

<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/

相关文章:

css - chrome 中的剑道 ui 网格 lrt css 中的错误

html - 将位置设置为固定时,表格宽度超过 100%

html - 延迟无限淡入淡出 CSS3 动画

javascript - 自动全尺寸浏览器

javascript - jQuery Mobile 加载错误

html - 自动调整 div 边框大小

css - 无法删除填充CSS

css - 如何使 Slickgrid 中的列覆盖整个网格/行宽?

javascript - 使用 JavaScript 将数据插入数据库时​​在控制台中创建错误 'Maximum call stack size exceeded'

html - 将 div 置于响应式内联 block div 下方