gpt4 book ai didi

css - 如何设置 css 在访问链接后不松散悬停效果?

转载 作者:行者123 更新时间:2023-11-28 02:55:16 25 4
gpt4 key购买 nike

目前是这样的:

/* OCSearch Texto */
.linksearch {
color: #fff;
margin-top: 1px;
margin-left: 20px;
font-size: 12px;
}

.linksearch a:link {
color:#d8d8d8;
}

.linksearch a:hover {
color:#fff;
}

.linksearch a:visited {
color:#d8d8d8;
}

单击时颜色变为#d8d8d8 但之后不再悬停。谢谢。

最佳答案

交替使用 :hover:visited 声明来解决这个问题。另外,不要忽视键盘用户的 :focus 伪。特别是如果您正在使用从可聚焦元素中删除 outline 的重置。

/* OCSearch Texto */
.linksearch {
...
}

.linksearch a:visited {
color:#d8d8d8;
}

.linksearch a:hover, .linksearch a:focus {
color:#fff;
}

关于css - 如何设置 css 在访问链接后不松散悬停效果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46490879/

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