问题描述
我访问的网络项目的链接不会下划线,但是,其余的访问修改是工作,下划线是为悬停工作。我给我的教练这个,他很困惑,说他会尽力找到时间来看看,但是,到期日期正在接近si我不能再等待。这是我的布局页面处理锚标签的部分:
My visited links for a web project won't underline, however, the rest of the visited modifications are working, and underline is working for hover. I showed my instructor this and he was confused, and said he would try to find time to look at it, however, the due date is nearing si I can no longer wait. Here is my the section of my layout page dealing with the anchor tag:
a:link
{
text-decoration: none;
color: #d1bd22;
font-size: 1.3em;
}
a:visited
{
text-decoration: underline;
color: white;
font-size: 1.3em;
}
a:hover
{
text-decoration: underline;
color: #d1bd22;
font-size: 1.3em;
}
a:active
{
text-decoration: none;
color: white;
font-size: 1.3em;
}
以下是我的网站链接:
推荐答案
帽子提示到@pwdst可以发现这一点。
Hat tip to @pwdst for spotting this.
查看Firefox的。类似的规则适用于Chrome。
See this documentation for Firefox. Similar rules apply to Chrome.
由于JavaScript可以读取应用于元素的样式(以及其他元素及其计算的样式),因此允许更改当:visited
的链接可以揭示关于他人访问过的其他网站的信息。
Since JavaScript can read the styles applied to an element (as well as other elements, and the computed styles of the same), allowing changes to a link when it is :visited
can reveal information about what others sites a person has visited.
为了保护用户的隐私,浏览器限制了:visited
和 text-decoration
不能更改。
In order to protect users' privacy, browsers limit which properties can be changed by :visited
and text-decoration
can not be altered.
另请参阅:有助于此行为:
See also: The Selectors specification which blesses this behaviour:
这篇关于被访问的链接不会下划线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!