无法更改已访问的内容:before伪元素
我试图为访问过的链接添加一些效果,然后我遇到这个问题。
I was trying to add some effects for visited links, then I got this problem.
这是代码: http://dabblet.com/gist/5447894
只有Opera可以成功更改内容的:before
伪元素。所有其他浏览器都失败。我错过了什么吗?感谢
Only Opera can successfully change the content of :before
pseudo-elements. All other browsers are fail. Did I miss anything? Thanks
访问过的链接的允许(=未忽略)CSS属性是 color
, background-color
, border - * - color
, / code>和
column-rule-color
(在某些情况下更多)。
The allowed (= not ignored) CSS properties of visited links are color
, background-color
, border-*-color
, outline-color
and, column-rule-color
(more under certain circumstances).
防止历史窃取攻击。有关详情,请参见本文。
This is to prevent history stealing attacks. See this article for further details.
因此,您可以在技术上为:visited
链接设置:之前
伪类,忽略并且看起来好像未访问链接。这不是一个错误,它是一个功能;)
So you can, technically, set a :before
pseudo class for :visited
links, but it will be ignored and appears as if the links are not visited. This is not a bug, it's a feature ;)