gpt4 book ai didi

html - 什么是正确的方法? CSS 链接伪类

转载 作者:搜寻专家 更新时间:2023-10-31 22:22:47 26 4
gpt4 key购买 nike

我刚找到这个:

Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!

Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!

Note: Pseudo-class names are not case-sensitive.

这是否意味着这是不正确

a:link, a:visited, a:active {
color: #006699;
text-decoration: none;
}

a:hover {
color: #2089CC;
text-decoration: underline;
}

遗憾的是来源是: http://www.w3schools.com/css/css_pseudo_classes.asp

如果你不知道为什么“悲伤”,请访问http://w3fools.com

最佳答案

如有疑问,请转到 specs .这是规范的摘录。

Note that the A:hover must be placed after the A:link and A:visited rules, since otherwise the cascading rules will hide the 'color' property of the A:hover rule

你说的是对的

a:link, a:visited, a:active {
color: #006699;
text-decoration: none;
}

a:hover {
color: #2089CC;
text-decoration: underline;
}

这就是为什么 this作品。

以下是不正确的。

a:hover {
color: #2089CC;
text-decoration: underline;
}

a:link, a:visited, a:active {
color: #006699;
text-decoration: none;
}

这就是为什么 this不起作用。

关于html - 什么是正确的方法? CSS 链接伪类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8159656/

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