bootstrap导航栏固定顶部重叠站点

bootstrap导航栏固定顶部重叠站点

本文介绍了twitter bootstrap导航栏固定顶部重叠站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上使用引导程序,并且导航栏固定顶部出现问题.当我只使用常规导航栏时,一切都很好.但是,当我尝试将其切换到导航栏固定顶部时,该网站上的所有其他内容都会向上移动,就像导航栏不存在并且导航栏与之重叠一样.我基本上是这样布置的:

I am using bootstrap on my site and am having issues with the navbar fixed top. When I am just using the regular navbar, everything is fine. However, when i try to switch it to navbar fixed top, all the other content on the site shifts up like the navbar isn't there and the navbar overlaps it. here's basically how i laid it out:

.navbar.navbar-fixed-top
  .navbar-inner
    .container
.container
  .row
    //yield content

我试图完全复制引导程序示例,但仅在使用navbar fixed top时仍然存在此问题.我在做什么错了?

i tried to copy bootstraps examples exactly but still having this issue only when using navbar fixed top. what am I doing wrong?

推荐答案

您的答案就在 docs :

body { padding-top: 70px; }

请确保在核心Bootstrap CSS的之后加入此.

Make sure to include this after the core Bootstrap CSS.

Bootstrap 4文档...

这篇关于twitter bootstrap导航栏固定顶部重叠站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 13:24