我知道这是一个很多人都有的问题,但是不熟悉Less并且不熟悉Bootstrap,我正在寻找一个全新的CSS解决方案,以防止我的导航栏在768 px以下崩溃:
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid header-top">
<ul class="navbar-nav navbar-left list-inline contact-links">
<li><a href="tel:180042762687"><span class="glyphicon glyphicon-earphone"></span></a></li>
<li><a href='****live chat**'><span class="glyphicon glyphicon-comment"></span></a></li>
<li><a href="mailto:***@***"><span class="glyphicon glyphicon-envelope"></span></a></li>
</ul>
<ul class="navbar-nav navbar-right list-inline account-and-cart-links">
<li><a href="my-account.html"><span class="glyphicon glyphicon-user"></span></a></li>
<li><a href="my-cart.html"><span class="glyphicon glyphicon-shopping-cart"></span></a></li>
</ul>
</div>
</div>
答案 0 :(得分:0)
将pull-left
和pull-right
添加到<ul>
。
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid header-top">
<ul class="navbar-nav navbar-left pull-left list-inline contact-links">
<li><a href="tel:180042762687"><span class="glyphicon glyphicon-earphone">
</span></a></li>
<li><a href='****live chat**'><span class="glyphicon glyphicon-comment"></span></a></li>
<li><a href="mailto:***@***"><span class="glyphicon glyphicon-envelope"></span></a></li>
</ul>
<ul class="navbar-nav navbar-right pull-right list-inline account-and-cart-links">
<li><a href="my-account.html">
<span class="glyphicon glyphicon-user"></span></a></li>
<li><a href="my-cart.html">
<span class="glyphicon glyphicon-shopping-cart"></span></a></li>
</ul>
</div>
</div>