【发布时间】:2014-06-04 18:21:12
【问题描述】:
我的页面上有:
- 固定顶部导航栏,高度为 74px;
- 在右栏添加侧边栏导航;
- 左栏,有可切换的内容;
<!-- initialization of affix -->
<body data-spy="scroll" data-target="#ds-right-navigation" data-offset="74">
<!-- toggleable content -->
<div class="panel">
<a id="ds-word-link-109401" data-toggle="collapse" data-target="#ds-word-109401" class="h3">1. równy</a>
<section id="ds-word-109401" class="col-md-12 ds-word-box collapse in" style="height: auto;">
...collapseable content
</section>
</div>
<div class="panel">
... next panel
</div>
我遇到的问题如下:
- 如果我单击带有锚点的链接,左列的内容将隐藏在固定顶部导航栏下(这个问题,我可能会使用 margin-top: -74px; padding-top: 74px 来修复)
- 如果我折叠左侧栏中的内容,那么使用词缀的侧边栏菜单就会变得疯狂。它仍将折叠的内容视为可见,因此侧边栏突出显示错误(隐藏/折叠)的内容。
【问题讨论】:
标签: twitter-bootstrap-3 fixed navbar sidebar affix