gpt4 book ai didi

html - 悬停在 Active 上的 Twitter Bootstrap 下拉菜单删除了背景

转载 作者:行者123 更新时间:2023-11-28 08:35:12 25 4
gpt4 key购买 nike

我有一个下拉菜单,它工作正常,直到我将鼠标悬停在事件页面上,它删除了背景。感谢您的帮助,如果您需要任何其他信息或需要我澄清任何问题,请询问。

下拉菜单和导航 CSS

.navbar-custom {
margin-bottom: 0;
border-bottom: 1px solid rgba(255,255,255,.3);
text-transform: uppercase;
font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
background-color: #000;
}

.navbar-custom .navbar-brand {
font-weight: 700;
}

.navbar-custom .navbar-brand:focus {
outline: 0;
}

.navbar-custom .navbar-brand .navbar-toggle {
padding: 4px 6px;
font-size: 16px;
color: #fff;
}

.navbar-custom .navbar-brand .navbar-toggle:focus,
.navbar-custom .navbar-brand .navbar-toggle:active {
outline: 0;
}

.navbar-custom a {
color: #fff;
}

.navbar-custom .nav li.active {
outline: none;
background-color: rgba(255,255,255,.3);
}

.navbar-custom .nav li a {
-webkit-transition: background .3s ease-in-out;
-moz-transition: background .3s ease-in-out;
transition: background .3s ease-in-out;
}

.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus {
outline: 0;
background-color: rgba(255,255,255,.3);
}

@media(min-width:767px) {
.navbar {
padding: 20px 0;
border-bottom: 0;
letter-spacing: 1px;
background: 0 0;
-webkit-transition: background .5s ease-in-out,padding .5s ease-in-out;
-moz-transition: background .5s ease-in-out,padding .5s ease-in-out;
transition: background .5s ease-in-out,padding .5s ease-in-out;
}

.top-nav-collapse {
padding: 0;
background-color: #000;
}

.navbar-custom.top-nav-collapse {
border-bottom: 1px solid rgba(255,255,255,.3);
}
}

.dropdown-menu>.active>a,
.dropdown-menu>.active>a:hover,
.dropdown-menu>.active>a:focus,
.dropdown-menu>.active>a:active {
background-color: #A8A8A8;
color: #ffffff;
}

这里是 jsfiddle但由于缺少 Bootstrap ,它看起来不正确。

此外,如果您想下载文件并以这种方式查看它们,我将它们放在保管箱中 here .

最佳答案

html-markup对应的选择器应该是.dropdown-menu .active li a:hover

尝试添加到 CSS

.dropdown-menu .active li a:hover{
background-color: #A8A8A8;
color: #ffffff;
}

关于html - 悬停在 Active 上的 Twitter Bootstrap 下拉菜单删除了背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28077730/

25 4 0