When I use better-scroll, I set up a navigation bar in which it is fixed, but it also scrolls.

when using better-scroll, I set a navigation bar in which it is fixed but also scrolls

.

the cause of the problem:
my initial solution is that Bscroll does not include the navigation bar, and then Bscroll sets top 80px so that the navigation bar is fixed, but it needs to be compatible with many mobile phone types. Css media queries are required to separately set top 10px, 20px, 30px and the like, which is very cumbersome.

how do you make the fixed positioning in better-scroll take effect?
or what other plug-ins can scroll smoothly. As long as you can scroll smoothly


what I do is to write a fixed top navigation outside the betterscroll, which is hidden by default. When the inner navigation scrolls to the top, the outer navigation shows

.
Menu