我是bootstrap 4中的新手,我想知道bootstrap 4中是否有一个选项,用于包含如下边框的导航栏菜单:image
谢谢!
答案 0 :(得分:1)
.nav-item {
border-right: 1px solid silver;
padding-right: 15px;
}
.nav-item:first-child {
border-left: 1px solid silver;
padding-left: 15px;
}

<link href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css" rel="stylesheet"/>
<nav class="navbar navbar-light" style="background-color:#fff">
<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="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
</ul>
</nav>
&#13;