<nav class="navbar navbar-expand-sm bg-dark navbar-dark fixed-top">
<div class="container">
<a href="#index.html" class="navbar-brand">Some title</a>
<button class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item text-center">
<a href="#link1" class="nav-link ">link1</a>
</li>
<li class="nav-item text-center">
<a href="#link2" class="nav-link">Link2</a>
</li>
<li class="nav-item text-center">
<a href="#link3" class="nav-link">link3</a>
</li>
</ul>
</div>
</div>
</nav>
在使用常规ol'Bootstrap 4时,默认情况下,在移动视图中,链接将在点击切换器图标后左对齐...我一直试图让它居中对齐但没有成功。有什么帮助?谢谢!