中间标题固定

问题描述 投票:0回答:1

我有三个不同的标题。

我希望在向下滚动时修复中间标题。但是,如果我将中间标题更改为固定。我搞砸头一个,头两个。

    <div class="row red">
      <h2>
        header one
      </h2>
    </div>

    <div class="row blue">
      <h2>
        header two
      </h2>
    </div>

    <div class="row red">
      <h2>
        header three
      </h2>

    </div>

小提琴https://jsfiddle.net/n01k9wtt/

twitter-bootstrap
1个回答
0
投票

对于类似的项目,我使用了Bootstrap类“navbar-fixed-top”,然后将padding-top添加到第2和第3个标题,以便它们不重叠。

© www.soinside.com 2019 - 2024. All rights reserved.