简体   繁体   English

隐藏了下拉子项-Bootstrap 3

[英]Dropdown children hidden - Bootstrap 3

I'm having issues with the bootstrap nav bar in a mobile view. 我在移动视图中的引导导航栏有问题。 As you can see via the image, the children are hidden when expanding the dropdown box. 从图像中可以看到,展开下拉框时,子级是隐藏的。 Is there a way to expand the menu so that they are no longer hidden? 有没有办法扩展菜单,使其不再隐藏?

Here is the mobile screenshot: Screenshot 这是手机屏幕截图: 屏幕截图

Here is my navbar at the moment:(Sorry about the hidden names etc) 这是我目前的导航栏:(抱歉隐藏名称等)

<nav class="navbar navbar-default" role="navigation">
              <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                  </button>
                  <a class="navbar-brand" href="#"></a>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                  <ul class="nav nav-pills nav-justified">
                    <li class="active"><a href="index.html">1</a></li>
                    <li><a href="process.html">2</a></li>
                    <li class="dropdown">
                      <a href="2.html" class="dropdown-toggle navbar-collapse" data-toggle="dropdown">2 <span class="caret"></span></a>
                      <ul class="dropdown-menu" role="menu">
                        <li><a href="3.html">3</a></li>
                        <li><a href="4.html">4</a></li>
                        <li><a href="5.html">5</a></li>
                        <li><a href="6.html">6</a></li>
                        <li><a href="7.html">7</a></li>
                        <li><a href="8.html">8</a></li>
                        <li class="divider"></li>
                        <li><a href="8.html">8</a></li>
                      </ul>
                      <li><a href="contact.html">Contact Us</a></li>
                    </li>
                  </ul>
                </div><!-- /.navbar-collapse -->
              </div><!-- /.container-fluid -->
            </nav>

Set the z-index of your dropdown menu to a value higher than the one of your pages body. 将下拉菜单的z-index设置为高于页面主体之一的值。

In your css do: 在你的CSS做:

.drodown-menu{
    z-index:1000; //or whatever value you want to use
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM