【问题标题】:Bootstrap 3: place sidebar left but having it beneath the content when collapsingBootstrap 3:将侧边栏放在左侧,但在折叠时将其放在内容下方
【发布时间】:2013-10-01 06:32:30
【问题描述】:

我正在使用 Twitter Bootstrap 3 开发一个网站,但我确实遇到了两个问题:

  1. 如何在大屏幕上放置侧边栏,但在页面折叠时将其放置在内容下方?

例如,这是我的结构(我必须将侧边栏放在右侧才能在折叠时将其放下):

    <div class="col-md-8">
      <p>This is content, and when collapsing I want it to be placed over the sidebar! </p>
    </div>
    <div class="col-md-4">
      <p>This is sidebar, and it gets down, but I would like to have it placed at the left side of the content!</p>
    </div>

非常感谢你,拉尔夫

【问题讨论】:

    标签: css twitter-bootstrap


    【解决方案1】:

    pull and push 类非常适合这个,试试吧:

    <div class="col-md-8 col-md-push-4">
      <p>This is content, and when collapsing I want it to be placed over the sidebar! </p>
    </div>
    <div class="col-md-4 col-md-pull-8">
      <p>This is sidebar, and it gets down, but I would like to have it placed at the left side of the content!</p>
    </div>
    

    【讨论】:

      猜你喜欢
      • 2014-06-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-10
      • 2021-09-06
      • 1970-01-01
      相关资源
      最近更新 更多