折叠后,如何在一行中对齐bootstrap 4导航栏?

时间:2017-07-18 09:55:45

标签: twitter-bootstrap bootstrap-4 twitter-bootstrap-4

我正在尝试使用 navbar-toggler 非折叠商品 单行 navbar em>按钮,当折叠sample。但是在折叠后它会分成多行。如何将它组成一行?

<nav class="navbar navbar-fixed-top navbar-toggleable-md navbar-light">
 <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  <span class="navbar-toggler-icon"></span>
 </button>

 <a class="navbar-brand" href="#">Navbar</a>

 <div class="collapse navbar-collapse" id="navbarSupportedContent">
  <ul class="navbar-nav mr-auto">
   <li class="nav-item">
    <a class="nav-link" href="#">Home</a>
   </li>
   <li class="nav-item">
    <a class="nav-link" href="#">Features</a>
   </li>
   <li class="nav-item">
    <a class="nav-link" href="#">Pricing</a>
   </li>
  </ul>
 </div>

 <ul class="navbar-nav">
  <li class="nav-item">
   <a class="nav-link" href="#">Logout</a>
  </li>
  <li class="nav-item">
   <a class="nav-link" href="#">Settings</a>
  </li>
 </ul>
</nav>

我正在使用Bootstrap 4 Alpha 6。

0 个答案:

没有答案