gpt4 book ai didi

html - 访问过的链接不会加下划线

转载 作者:太空宇宙 更新时间:2023-11-04 14:38:44 25 4
gpt4 key购买 nike

我访问过的一个网络元素的链接不会下划线,但是,其余的访问过的修改都有效,下划线对悬停有效。我给我的导师看了这个,他很困惑,说他会尽量找时间看,但是,预产期快到了,我已经等不及了。这是我的布局页面中处理 anchor 标记的部分:

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;
}

这是我网站的链接:

http://cis.luzerne.edu/~ds0002/morlansfamousshop.html

最佳答案

感谢@pwdst 发现这一点。

参见 this documentation对于火狐。类似的规则适用于 Chrome。

由于 JavaScript 可以读取应用于元素(以及其他元素,以及相同元素的计算样式)的样式,因此允许在 :visited 链接时更改链接可以揭示有关的信息一个人访问过的其他网站。

为了保护用户隐私,浏览器限制了哪些属性可以通过:visited改变,text-decoration不能改变。

另请参阅:The Selectors specification祝福这种行为:

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.

关于html - 访问过的链接不会加下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20640731/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com