有什么办法可以使bootstrap 4下推式内容导航栏

时间:2019-05-09 05:47:50

标签: javascript html5 css3 bootstrap-4

请参考“ https://codepen.io/anon/pen/XbBPPY”,我希望得到相同的结果,但我不想使用bootstrap-3,而是要使用bootstrap-4。 您可以在参考链接“ https://codepen.io/anon/pen/XbBPPY”中看到代码

HTML

  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" 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>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav" id="nav">
        <li class="nav-link active"><a href="#">Link</a></li>
        <li class="nav-link"><a href="#">Link</a></li>
        <li class="nav-link"><a href="#">Link</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="menu-trigger">Drop-Down Menu<i class="fa fa-angle-down flipped"></i></a>
          <ul class="dropdown-menu" id="menu">
            <li class="nav-link">
              <a href="#" class="m-pub"><i class="fa fa-microphone fa-2x"></i>Option</a>
            </li>
            <li class="nav-link">
              <a href="" class="m-pub"><i class="fa fa-newspaper-o fa-2x"></i>Option</a>
            </li>
          </ul>
        </li>
        <li class="nav-link"><a href="#">Link</a></li>
        <li class="nav-link"><a href="#">Link</a></li>
      </ul>
    </div>
  </div>
</nav>
<div class="container" style="background: red;height:100px; width: 100%;">
</div>```

0 个答案:

没有答案