所以我想使用Bootstrap将导航项移到导航栏的中心附近,但是遇到了麻烦。我不希望他们一直到外面,也不要一直到中心。例如,我希望left元素在左居中,而right则在右居中。我包括了一张图片和我的代码。反正有做这个Bootstrap吗?已经尝试过偏移,并且弄乱了导航元素。
<nav class="navbar navbar-expand-lg sticky-top" id="navbar">
<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="navbar-nav">
<a class="navbar-brand active" href="/"><img src="../static/img/123.png"></a>
<li class="nav-item">
<a class="nav-link" href="#">Why Our Site<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#test">How it works</a>
</li>
<li class="nav-item">
<a class="nav-link" href="support">FAQ</a>
</li>
<li class="nav-item">
<a class="nav-link" href="blog">Blog</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#">Login</a>
<li class="nav-item">
<a href="signup" class="btn btn-md btn-primary shadow-lg" role="button"><span>Sign up</span></a>
</ul>
</div>
</nav>
感谢您的帮助。