I have two sections. When mobile, the second div goes under first div. But how can I get the second div first when mobile (col-sm or col-xs)?
<div class="col-md-8">
Hello
</div>
<div class="col-md-4">
world
</div>
答案 0 :(得分:3)
您可以使用boostrap类col-lg-push-x
和col-lg-pull-x
。
另见演示:enter link description here
<强>经验:强>
<div class='row'>
<div class='col-lg-5 col-lg-push-5'>World</div>
<div class='col-lg-5 col-lg-pull-5'>Hello</div>
<div class='col-lg-2'></div>
</div>
答案 1 :(得分:0)
尝试将代码更改为:
<div class="col-lg-9 col-lg-push-3">
Hello
</div>
<div class="col-lg-3 col-lg-pull-9">
World!
</div>