我正在创建一个新的角度项目,并从导航栏开始,但是使用此代码,“登录”按钮未向右对齐。
<div>
<nav class="navbar navbar-expand-md bg-primary navbar-dark" >
<ul class="navbar-nav">
<span class="navbar-text" style="color: black">
Niffler
</span>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<form class="form-inline">
<input class="form-control mr-sm-2" type="text"
placeholder="Search...">
<button class="btn btn-info" type="submit">Search</button>
</form>
</li>
<li>
<button type="button" class="btn btn-primary" data-
toggle="modal" data-target="#myModal">
Login
</button>
</li>
</ul>
</nav>
</div>
答案 0 :(得分:0)
您需要将navbar-toggler-right
类添加到项目中