我在sm和xs上对bootsrap上的colums进行排序时遇到问题。我想在sm和xs分辨率上将顺序从“1”,“2”,“3”更改为“1”,“3”,“2”:
http://imageshack.com/a/img923/8600/DF8LGA.png
我尝试将col-xs-push-12设置为“2”列,将col-xs-push-12设置为“3”列,但它不起作用。请帮帮我。
以下是我的文件: http://www.speedyshare.com/6B6Fv/public-html.rar
和代码:
<div class="header-bot">
<div class="container">
<div class="row">
<div class="col-sm-2">
<a class="logo-1 hidden-sm hidden-xs" href="index.html">
<img src="img/logo-md.png" alt="Logo"/>
</a>
<a class="visible-sm" href="index.html">
<img src="img/logo-sm.png" alt="Logo"/>
</a>
<a class="visible-xs" href="index.html">
<img src="img/logo-xs.png" alt="Logo"/>
</a>
</div>
<div class="col-md-7 col-sm-12 col-xs-push-12">
<nav class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="hidden-xs icon-bar"></span>
<span class="hidden-xs icon-bar"></span>
<span class="hidden-xs icon-bar"></span>
<span class="visible-xs glyphicon glyphicon-menu-hamburger"></span>
</button>
<p class="hidden-lg hidden-md">Menu</p>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="ul-main nav navbar-nav navbar-right">
<li><a href="#">new</a></li>
<li><a href="#">designers</a></li>
<li><a href="#">women</a></li>
<li><a href="#">men</a></li>
<li><a href="#">clearence</a></li>
</ul>
</div>
</nav>
</div>
<div class="header-user col-md-3 col-sm-4 col-xs-pull-12">
<div class="cart hidden-xs">
<p>Your cart</p>
</div>
<div class="basket">
<p>0 Items | $ 0</p>
</div>
</div>
</div>
</div>
</div>
答案 0 :(得分:0)
使用较高屏幕尺寸的拉/推,如此
<div class="header-user col-sm-4 col-md-3 col-md-push-7">
...
<div class="col-sm-12 col-md-7 col-md-pull-3">
...