Javascript 粘性顶杆不工作Zurb基金会 我读了很多反对使用TopBar基金会的文章。像

Javascript 粘性顶杆不工作Zurb基金会 我读了很多反对使用TopBar基金会的文章。像,javascript,jquery,css,zurb-foundation,Javascript,Jquery,Css,Zurb Foundation,这里呢 这对我来说很“古怪”。有时有效,有时无效 这是我的密码 我用这个激活了它,对吗 $(document).foundation().foundation('topbar'); 有什么线索可以解释为什么这个不能坚持吗?将它添加到css中 .sticky{ position:fixed; z-index:999; } .cuisines{ margin-top:50px; } 。你错过了一些css .sticky{ position:fixed;

这里呢

这对我来说很“古怪”。有时有效,有时无效

这是我的密码

我用这个激活了它,对吗

$(document).foundation().foundation('topbar');
有什么线索可以解释为什么这个不能坚持吗?

将它添加到css中

.sticky{
    position:fixed;
    z-index:999;
}
.cuisines{
    margin-top:50px;
}
。你错过了一些
css

.sticky{
    position:fixed;
    z-index:999;
}
.cuisine {
    margin-top:50px;
}

不知何故,我认为topbar.js应该添加这一点。行动!那么,顶杆固定类和粘滞类之间有什么区别?