我需要右边的菜单。在移动视图中效果很好,请在左侧对齐,在右侧保留空间。但是我要求结果与台式机相反。菜单需要左右对齐,可以留空白。如何做到这一点?
这是我的代码:mr-auto
在移动设备上工作正常。如何仅在移动设备上申请?
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">English</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">French</a>
<a class="dropdown-item" href="#">German</a>
<a class="dropdown-item" href="#">Doutch</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Michel Pienazak</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Settings</a>
</div>
</li>
</ul>