右对齐列表项bootstrap navbar

时间:2017-11-03 17:09:32

标签: html css3 bootstrap-4



<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <a class="navbar-brand" href="#">Item</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-              controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="nav navbar-nav">
        <li class="nav-item active">
          <a class="nav-link" href="#">Home<span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Item2</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Item3</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Item4</a>
        </li>
      </ul>
    </div>
  </nav>
&#13;
&#13;
&#13;

我想使用bootstrap导航栏,但我不知道如何将无序列表的项目对齐。你能救我吗?

0 个答案:

没有答案