gpt4 book ai didi

css - 如何解决 Bootstrap 主题中的这个重叠下拉菜单

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

我下载了一个 bootstrap 主题并稍微调整了一下。我在我的 div 的顶部添加了一个插入符号和一个下拉菜单,但是菜单下拉菜单被我的侧边栏覆盖了。我想把它放在它前面,这是图像:

enter image description here

这是我的下拉列表中的代码:

.custom-drop {
position: relative;
min-width: 105px;
z-index: 5000;
}

.frontview {
z-index: 5000;
position: relative;
}
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-circle text-success"></i> Online</a><span class="caret"></span>
<ul class="dropdown-menu custom-drop">
<li class="frontview"><a href="#">Profile</a></li>
<li class="frontview"><a href="#">Sign-out</a></li>
</ul>

最佳答案

我同意 Immortal Dude 的建议。如果还是不行,您也可以尝试将侧边栏的 z-index 设置为 -1。

关于css - 如何解决 Bootstrap 主题中的这个重叠下拉菜单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42269565/

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