I'm using the locomotive scroll library for smooth scrolling, The js file of this library creates a custom scrollbar to the body and there is even an option we can disable it.
See the demo of locomotive library codepen demo here
Another demo Look at the page it has a custom scrollbar and I need the default browser native scrollbar.
Demo
The CSS part of this library makes the native scrollbar hidden.
html.has-scroll-smooth {
overflow: hidden;
}
I need the browser native scrollbar should be there and for that, I made the overflow: auto.
But it creates extra whitespace. Is there any way to keep the browser's native scrollbar?
html.has-scroll-smooth {
overflow: auto;
}
If it is not possible to use the native scroll bar with a locomotive library please suggest an alternate solution for the same result.
The tweaks I've made it demo
question from:
https://stackoverflow.com/questions/65951585/browser-native-scrollbar-with-locomotive-smooth-scrolling-library-not-the-custom 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…