为什么某些CSS属性未应用于:已访问?

Dan*_*rth 14 css

我的网站有一些链接样式,CSS如下:

a:link {
    font-family: Verdana, Tahoma, Geneva, sans-serif;
    text-decoration: none;
    color: #0676b3;
}

a:visited {
    color: #666;
    text-decoration: underline;
}

a:hover {
    color: #fff;
    background: #A5C2DB;
    border-radius: .1875em;
    padding: 0 .1875em;
}
Run Code Online (Sandbox Code Playgroud)

这是一个jsfiddle,显示他们应该如何看待他们的不同状态:

a {
  display: inline-block;
  margin: 10px;
}
/*  these styles are for presentation of the link states they are NOT the styles in my stylesheet*/

a.link {
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: .875em;
  text-decoration: none;
  color: #0676b3;
}
a.visited {
  color: #666;
  text-decoration: underline;
}
a.hover {
  color: #fff;
  background: #A5C2DB;
  border-radius: 0.1875em;
  padding: 0 0.1875em;
}
Run Code Online (Sandbox Code Playgroud)
<a class="link">Regular Link</a>
<br />
<a class="visited">Visited Link</a>
<br />
<a class="hover">Hovered Link</a>
Run Code Online (Sandbox Code Playgroud)

:link =蓝色文字没有装饰

:visited =灰色文字带下划线

:hover =浅蓝色背景的白色文字

:link:hover工作正常,但由于某些原因,:visited国拒绝显示下划线.在Chrome和Firefox中使用firebug或者检查器我可以看到:visited样式在运行,文本是灰色的,只有它拒绝underline状态.

关于我做错了什么的任何想法?

chi*_*len 15

你没有做错任何事 - 它不会那样(不再)了.样式:访问被用作安全漏洞,因此浏览器制造商基本上消除了替代样式:访问除了少数属性(例如'颜色','背景颜色')

请参阅:http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/