Change section order with Bootstrap 3

淺唱寂寞╮ 提交于 2019-12-12 06:37:55

问题


On a page I have two columns. On the first one (black), I have one section which contains an image. The second one, has two blocks (blue and green).

I want to change the order of the three sections like in this schema I have made:

I found some way of doing with push and pull, but it's only put the black block last instead of first.


回答1:


Adapted from Isherwood's answer in this very similar question:

Have them in order on a small screen, and then on a larger screen, pull them to the appropriate side of the page:

<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-6 blue pull-right"></div>
        <div class="col-xs-12 col-sm-6 black pull-left"></div>
        <div class="col-xs-12 col-sm-6 green pull-right"></div>
    </div>
</div>

Demo in Fiddle



来源:https://stackoverflow.com/questions/24869487/change-section-order-with-bootstrap-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!