反向网格排列?

时间:2015-01-13 14:29:07

标签: twitter-bootstrap-3

我右边有一个侧边栏,左边有内容:

<div class="col-md-9">
  <p>Main. At large zoom -- currently it goes to top. I want it to go to the bottom.</p>
</div>

<div class="col-md-3">
  <p>Sidebar. At large zoom -- currently it goes to bottom. I want it to go to the top.</p>
</div>

我希望侧边栏能够以大变焦(例如在手机上)上移动。但是bootstrap将它发送到底部:http://www.bootply.com/nqOuCvbXZR

Bootstrap 3文档使用相同的布局并遇到同样的问题:例如,请参阅http://getbootstrap.com/css

是否可以修改bootstrap默认排列规则?

1 个答案:

答案 0 :(得分:1)

首先考虑移动设备。将移动设备上的列放在第一位。并使用拉动和推动更大的屏幕。

<div class="col-xs-12 col-md-push-9 col-md-3">
  <p>Sidebar. At large zoom -- currently it goes to bottom. I want it to go to the top.</p>
</div>

<div class="col-xs-12 col-md-pull-3 col-md-9">
  <p>Main. At large zoom -- currently it goes to top. I want it to go to the bottom.</p>
</div>