gpt4 book ai didi

html - 如何使这个下拉菜单在导航栏下方全宽?

转载 作者:行者123 更新时间:2023-11-28 15:56:26 30 4
gpt4 key购买 nike

我有一个基本的 Bootstrap 导航栏 here

我想做的是:

(Navbar)

-----Logo------Item----Dropdown----------------------------Login/Signup-----

(Dropdown menu)

-----Sub-item----Sub-item----Sub-item---------------------------------------

悬停时,我想让下拉菜单在导航栏正下方显示全宽。悬停事件不是我遇到的问题,我无法将其正确定位为完整的 100% 宽度。

更新

我看到 bootstrap 添加了 position: relative.nav > li,当我在 Chrome 开发者工具中取消它时,它从屏幕开始全宽导航栏元素的位置。

解决方案

Working Example

我的示例的解决方案是将 Bootstrap 的 .nav>li 覆盖为 position: static

我现在知道这叫做 super 菜单 :)

最佳答案

如果我的想法是正确的,我不知道你到底需要什么,你想要这个链接,请检查 bootstrap mega 菜单

click here

关于html - 如何使这个下拉菜单在导航栏下方全宽?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41052887/

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