html - 如何使链接在访问后不改变颜色?

标签 html css

我有这个 CSS:

a:visited 
{
    text-decoration: none; 
    decoration: none; 
}

访问链接后,它会改变颜色。

此页面右侧底部的“浏览所有问题”链接发生了这种情况:http://www.problemio.com

谢谢!

最佳答案

文本装饰影响下划线,而不是颜色。

要将访问的颜色设置为与默认颜色相同,请尝试:

a { 
    color: blue;
}

或者

a {
    text-decoration: none;
}
a:link, a:visited {
    color: blue;
}
a:hover {
    color: red;
}

关于html - 如何使链接在访问后不改变颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8188060/

相关文章:

html - 不同尺寸的分离器

java - 复选框 - CSS 效果不起作用

javascript - 使用 Javascript 和 Jquery 添加 li 元素

javascript - 多级水平菜单 CSS

javascript - 如何加快 Bootstrap 导航栏中的移动下拉菜单?

javascript - map 不占用整个div

html - CSS : center form in page horizontally and vertically

CSS 链接充当按钮但继承行为

html - 4个div,需要居中2个中心div

php - 在我的网页中获取IP地址(192.168.X.X,由无线路由器分配)?