gpt4 book ai didi

css - Bootstrap v3.2 nav-list - 悬停样式保持不变 - ie9

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

因此,当悬停在导航栏链接上时,我使用 bootstrap 生成悬停样式。在您使用 IE9 并且速度太快之前,此方法工作正常,样式保持“悬停”状态,即使不再悬停该元素也是如此。

像这样,我可以在我的菜单中以“悬停”样式获得多个元素,这是不应该发生的。

我的代码:

<ul class="nav nav-list">
<!-- ko foreach: router.activeItem().sidebar.links -->
<li data-bind="visible: visible" class="special">
<a data-bind="attr: { href: hash, title: title }"
data-toggle="tooltip"
data-placement="right">
<i class="menu-icon fa fa-5x" data-bind="css: icon"></i>
</a>
</li>
<!-- /ko -->
</ul>

错误:

enter image description here

我已经尝试了很多事情,比如像这样添加另一个类:

.noHoverForThis {
color: inherit !important;
}

由于某些原因,这不起作用。同样覆盖整个 Bootstrap 类对我不起作用,除非我努力写这个...

.navbar .nav-list > li:hover > a, 
.navbar .nav-list > li > a:hover {
background-color: #e7e7e7 !important;
color: inherit !important;
}

请记住,该错误仅出现在 IE9 中。

非常欢迎任何帮助!

编辑: 有趣的是:我正在使用 ACE 主题 www.wrapbootstrap.com

最佳答案

所以我终于想通了。

应该用来解决这个问题并覆盖悬停状态的代码是:

.no-skin .nav-list > li:hover > a {
background-color: rgb(248, 248, 248) !important;
color: #585858 !important;
}

.nav-list > li::before {
width: 0;
height: 0;
display: none;
}

然后将其包含在durandal的Index.cshtml

    <!--[if lte IE 9]>
<link rel="stylesheet" href="../../Content/IEHacks.css" />
<![endif]-->

这将使用 bootstrap v3.2 覆盖 ace 主题的悬停

关于css - Bootstrap v3.2 nav-list - 悬停样式保持不变 - ie9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27906071/

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