导航栏下拉菜单不超出容器 [英] The navbar dropdown menu does not beyond the container
本文介绍了导航栏下拉菜单不超出容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是导航栏的 html
<div class="col-xs-12"><nav class="navbar" id="nav_menu"><ul class="nav navbar-nav"><li class="item"><a href="">首页</a></li><li class="下拉项目打开"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">关于我们</a><ul class="下拉菜单"><li><a href="">人物</a></li></nav>
问题是尺寸受限于导航栏的高度,这意味着下拉框不能超出导航栏的尺寸.检查后我怀疑它不是由 z-index 引起的.和溢出有关,但是有什么元素标签需要改变吗?
感谢您的帮助
测试链接:http://kotechweb.com/kmk/
解决方案
<div class="row" style="overflow:visible;"></div>
预>
Here is the navbar html
<div class="row">
<div class="col-xs-12">
<nav class="navbar" id="nav_menu">
<ul class="nav navbar-nav">
<li class="item"><a href="">Home</a></li>
<li class="dropdown item open">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">About us</a>
<ul class="dropdown-menu">
<li><a href="">People</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
And the problem is the size is restrict to the navbar height, that means the dropdown box can not go beyond the nav bar size. I suspect it is not caused by z-index after checking. It is something related to the overflow, but any element tag need to change?
Thanks for helping
The test link: http://kotechweb.com/kmk/
解决方案
<div class="row" style="overflow:visible;"></div>
这篇关于导航栏下拉菜单不超出容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文