在小 scrn 处交换 2 列堆叠顺序-Bootstrap 推拉类或浮动修复? [英] Swap 2 column stacking order at small scrn- Bootstrap push pull class or float fix?

查看:23
本文介绍了在小 scrn 处交换 2 列堆叠顺序-Bootstrap 推拉类或浮动修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我做什么,我都无法让正确的列以 100% 宽度/小屏幕先推并堆叠.我试过 col-xs-pull/push-12 或 col-xs-pull/push-0.我也尝试弄乱 div 浮动,但无济于事.

我是否遗漏了一些明显的东西,或者我是否需要开始这个难题的第二阶段?

解决方案

如果您采用移动优先"的方法,则将 r 列放在标记的首位,然后相应地使用推/拉

<div id="r-column" class="col-xs-12 col-sm-push-8 col-sm-4">right</div><div id="main" class="col-xs-12 col-sm-pull-4 col-sm-8">main</div>

http://www.bootply.com/121630

No matter what I do I can't get the right column to push over and stack first at 100% width/small scrns. I tried col-xs-pull/push-12 or col-xs-pull/push-0. I also tried messing around with the div floats, to no avail.

Am I missing something obvious, or do I need to start a Phase 2 of this conundrum?

<div class="row>
<div id="main" class= "col-xs-12 col-xs-pull-? col-sm-8"></div>
<div id="r-column" class="col-xs-12 col-xs-push-? col-sm-4"></div>
</div>

解决方案

If you go with a "mobile first" approach, you put the r-column first in your marking and then use push/pull accordingly

<div class="row">
 <div id="r-column" class="col-xs-12 col-sm-push-8 col-sm-4">right</div>
 <div id="main" class="col-xs-12 col-sm-pull-4 col-sm-8">main</div>
</div>

http://www.bootply.com/121630

这篇关于在小 scrn 处交换 2 列堆叠顺序-Bootstrap 推拉类或浮动修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆