CSS customization is currently only supported by webkit browsers (Safari, Google Chrome, and Opera). IE and Firefox do not support CSS styles for scrollbars. To customize your CSS-based custom scrollbar, you must use a javascript solution that emulates the scroll behavior or replace your own scrollbars with custom elements (custom scrollbars are under this custom scrollbar or hidden by the shell with overflow:hidden ).
There are many free jQuery plugins. Scrolling emulators (e.g. jScrollPane , Malihu Custom Scrollbar , perfect-scrollbar , etc.) provide full control over scrollable content, but have more js (to emulate and handle all events) and scroll behaior differs from normal scroll behavior. In addition, many scroll bars on one page can slow down.
Scroll bars that use native scrolling (e.g. jQuery Scrollbar , Scroller , Baron , etc.) are smaller than the code and ensure that scrolling will always work (even if the plugin does not work due to some kind of error) + less code ( since there is no need to emulate scrolling) + automatically supports all scrolling functions, such as scrolling to a focused element, scrolling for text selection, scrolling to an anchor element, touch scrolling, etc.
You can compare custom scroll plugins here
source share