gpt4 book ai didi

css - 将鼠标悬停时突出显示的菜单项更改为悬停在 wordpress 上的下划线

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

我在更改菜单项悬停时的外观时遇到了一些困难。目前它被设置为在悬停时突出显示,但我希望它被加下划线。

enter image description here

最佳答案

在悬停时使用 text-decoration: underline; 并移除颜色定义:

.navbar-nav > li > a:hover {
color: black;
text-decoration: underline;
}

我看到它被其他 css 覆盖所以使用 !important

.navbar-nav > li > a:hover {
color: black!important;
text-decoration: underline!important;
}

编辑

Can i increase the weight/thickness of the underline

使用border-bottom代替text-decoration

.navbar-nav > li > a:hover {
color: black!important;
text-decoration: none;
border-bottom: 10px solid black;
}

关于css - 将鼠标悬停时突出显示的菜单项更改为悬停在 wordpress 上的下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51277924/

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