简体   繁体   中英

Sticky topbar not working Zurb Foundation

I read many things against using topbar from Foundation. Like

A sticky Top Bar makes the page jump up when scrolling past it with Zurb Foundation

and here

https://github.com/zurb/foundation/issues/2005

It is very "flaky" for me. Sometime works and sometime doesn't

This is my code http://jsfiddle.net/qhoc/48Tur/1/

I activated it by this right?

$(document).foundation().foundation('topbar');

Any clue why this one does NOT stick?

Here is a working fiddle . You missed out some css

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

add this to your css

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM