如何使用CSS删除Chrome中的链接下划线? [英] How can I remove the underline of a link in chrome using CSS?

查看:96
本文介绍了如何使用CSS删除Chrome中的链接下划线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(它在FF中工作)
如何使用CSS删除访问链接的下划线?我曾尝试过:

(it works in FF) How can I, using CSS, remove the underline of a visited link? I have tried:

a:visited {
    color: rgb(255, 255, 255);
    text-decoration: none !important;
}

a:visited {
    color: rgb(255, 255, 255);
    text-decoration: none;
}


推荐答案

适用于:大多数基于webkit的浏览器(如Chrome浏览器)中访问过的链接是 color 。这是为了防止历史被盗用。此外,您无法确定JavaScript链接的 color CSS属性的值。请参阅 https://bugs.webkit.org/show_bug.cgi?id=24300详细信息。

The only CSS property you can apply on :visited links in most webkit-based browsers (like Chrome) is color. This is to prevent history stealing. Also, you can't determine the value of the color CSS property of links from JavaScript. See https://bugs.webkit.org/show_bug.cgi?id=24300 for details.

但是,您可以使用 a {text-decoration:none;} 这是整个事件的演示

You can, however, change the style of all links with a{text-decoration: none;}. Here's a demo of the whole affair.

这篇关于如何使用CSS删除Chrome中的链接下划线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆