导航栏在展开时不会将其下方的内容下推

时间:2019-01-11 15:37:38

标签: html css laravel bootstrap-4

当我在网站上切换到移动模式并按按钮展开菜单时,它会展开,但与菜单下面的内容重叠,因此不可读。我该如何做才能使内容向下推?

<nav class="navbar navbar-default  navbar-static-top" role="navigation">
<div class="container">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <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="{{ route('home') }}">
            <img src="logo.png" height="75px">
        </a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">text</a></li>
                <li><a href="#"> <i class="fa fa-lock"></i>text</a>  </li>
                <li><a href="#"> <i class="fa fa-save"></i>text</a></li>
                <li><a href="#"> <i class="fa fa-tag"></i>text</a></li>
                <li><a href="#"> <i class="fa fa-rss"></i>text</a></li>
                <li><a href="#"> <i class="fa fa-mail-forward"></i>text</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Language <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ route('switch_language', 'en') }}">English</a></li>
                    </ul>
                </li>
            </ul>
    </div><!--/.navbar-collapse -->
</div>

0 个答案:

没有答案