6

我正在使用 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>

非常感谢,拉尔夫

4

1 回答 1

10

pull 和 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>
于 2013-09-25T15:36:42.130 回答