gpt4 book ai didi

css - 单击链接后 anchor 悬停保持不变

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

假设我想创建 nav-top-menu 按钮,每个按钮都有 anchor 标记和 href 给定。我的风格是:悬停在每个按钮上。当我点击链接时,a:hover to that button I click is gone.I want the anchor hover 在我点击链接后保持不变。我最好用 CSS 来做。

button a:hover {
border:1px solid #000;
box-shadow:1px 1px 0px 8px #1fb6dc;
}

最佳答案

试试这个:

button a:hover {
border:1px solid #000;
box-shadow:1px 1px 0px 8px #1fb6dc;
}
button a:active
{
border:1px solid #000;
box-shadow:1px 1px 0px 8px #1fb6dc;
}

关于css - 单击链接后 anchor 悬停保持不变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21898700/

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