强调访问过的链接 [英] Underlining visited links

查看:124
本文介绍了强调访问过的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑下面的例子: http://jsfiddle.net/A8v9x/4/ - 当你点击一个链接然后回来到页面,第一个链接变为绿色。但是,它仍然没有一个底线,即使访问过的链接被声明为文本装饰:下划线;
没有什么变化,即使你添加!重要该规则。

Given the following example: http://jsfiddle.net/A8v9x/4/ - when you click the first link and then come back to the page, the first link turns green. However, it still does not have an underline, even though visited links are declared to have text-decoration:underline;. Nothing changes even if you add !important to that rule.

找不到关于CSS规范这种行为的任何信息。它是一种常见的浏览器错误?如何围绕它一部作品?

Could not find any information about such behavior in CSS spec. Is it a common browser bug? How does one work around it?

推荐答案

您不能更改文字修饰:访问。这是出于对隐私的关注这是在<一个讨论href=\"https://developer.mozilla.org/en/CSS/Privacy_and_the_:visited_selector\">https://developer.mozilla.org/en/CSS/Privacy_and_the_:visited_selector.基本上改变计算性能可以让网站来确定用户访问过哪些网站。

You can't change text-decoration in :visited. This is out of privacy concerns which are discussed at https://developer.mozilla.org/en/CSS/Privacy_and_the_:visited_selector. Basically changing computed properties can allow websites to determine which sites a user has visited.

这可用于式访问链接的CSS属性是颜色,背景色,边界 - * - 色,轮廓色和列规则色和,当两个未访问和访问样式是颜色(未油漆的服务器或无),填充和描边属性。对于不允许的属性(以及允许的属性的α分量,当RGBA()或HSLA()的颜色或透明的使用),为未访问链接的样式来代替。

The CSS properties that can be used to style visited links are color, background-color, border-*-color, outline-color and, column-rule-color and, when both the unvisited and visited styles are colors (not paint servers or none), the fill and stroke properties. For properties that are not permitted (and for the alpha components of the permitted properties, when rgba() or hsla() colors or transparent are used), the style for unvisited links is used instead.

这篇关于强调访问过的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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