Bootstrap固定导航在滚动时跳转 [英] Bootstrap fixed navigation jumps when scrolling

查看:63
本文介绍了Bootstrap固定导航在滚动时跳转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与Bootstrap合作已经有一段时间了,从来没有遇到过这个问题.我希望导航固定在页面顶部,但是当我滚动经过轮播时,它会跳转/出现故障.我希望您能看到它,我正在使用Chrome.

I've worked with Bootstrap for a while and never come across this problem. I want the navigation to remain fixed at the top of the page, but when I scroll past the carousel it jumps/glitches. I hope you can see it, I'm using Chrome.

当我卸下转盘时,它运转良好,但是看不到任何错误.谁能发现明显的东西?

When I remove the carousel, it works perfectly, but I can't see any errors. Can anyone spot anything obvious?

我固定的导航栏代码:

<header class="navbar-fixed-top" role="navigation">
    ....
</header>

推荐答案

您忘记了将 navbar 类添加到标题标签中.

You forgot to add the navbar class to your header tag.

更改此:

<header class="navbar-fixed-top" role="navigation">

对此:

<header class="navbar navbar-fixed-top" role="navigation">

并将其添加到您的CSS:

And add this to your css:

.navbar-fixed-top  {
     -webkit-backface-visibility: hidden;
}

这篇关于Bootstrap固定导航在滚动时跳转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆