导航栏下拉菜单不在容器之外

时间:2016-06-12 14:03:08

标签: html css twitter-bootstrap css3

这是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>

enter image description here

问题是尺寸限制在导航栏高度,这意味着下拉框不能超出导航栏的大小。我怀疑它不是由检查后的z-index引起的。它与溢出有关,但是任何元素标签都需要改变吗?

感谢您的帮助

测试链接: http://kotechweb.com/kmk/

2 个答案:

答案 0 :(得分:2)

&#13;
&#13;
>>> for key, value in list1:
...     print '{}  {:<2d} ||| {}'.format(
...         key, value['count'],
...         ', '.join(['%s %d' % kv for kv in value['value1'].most_common()]))
...
key1  10 ||| set1 5, set2 4, set3 1
key2  8  ||| set1 6, set2 2
key3  7  ||| set1 5, set2 2, set3 1
&#13;
&#13;
&#13;

答案 1 :(得分:1)

摆脱

.left_menu_body {
  margin-bottom: -99999px;
  padding-bottom: 99999px;
}
.row {
  overflow: hidden;
}

真的不明白为什么你在.left_menu_body

上做了那个疯狂的“黑客”