设置:visited伪元素的样式 [英] Styling the :visited pseudo element

查看:41
本文介绍了设置:visited伪元素的样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以将哪些样式应用于:visited链接?似乎只有颜色在起作用.

Which styles can I apply to a :visited link? It seems only color is working.

我了解隐私问题.是否有一种非侵入式的方式:访问的链接?

I understand the privacy issue. Is there a non invasive way of styling :visited links?

推荐答案

两者 CSS2 这样说:

注意:样式表作者可能会滥用:link和:visited伪类来确定用户未经用户同意访问了哪些站点.

因此,UA可以将所有链接视为未访问的链接,或实施其他措施来保护用户的隐私,同时以不同的方式呈现已访问和未访问的链接.

UAs may therefore treat all links as unvisited links, or implement other measures to preserve the user's privacy while rendering visited and unvisited links differently.

因此,根据标准,您完全不能完全依赖样式 a:visited .我的经验是,所有浏览器都将关注着色属性(如Soufiane Hassou在Gecko浏览器中所指出的),而其他方面则很少.

So, according the standards, you can't really depend on styling a:visited at all. My experience is that all the browsers will pay attention to the coloring properties (as noted by Soufiane Hassou for Gecko browsers) but little else.

这篇关于设置:visited伪元素的样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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