Advertisement

CSS Scrollbar Generator

Scroll down to see the custom scrollbar in action.






You can customize the track and thumb colors.






Adjust width and border radius to make it perfect.






Works in all WebKit browsers (Chrome, Safari, Edge).






End of content.

CSS Output

CSS Scrollbar Styling

Custom scrollbars use the ::-webkit-scrollbar pseudo-element family in Chromium-based browsers, and the standard scrollbar-width + scrollbar-color properties in Firefox.

Key Pseudo-Elements (Chromium)

Firefox Standard Properties

Does CSS scrollbar styling work in all browsers?

The ::-webkit-scrollbar approach works in Chrome, Edge, and Safari. Firefox uses the standard scrollbar-width and scrollbar-color properties. Mobile browsers typically ignore scrollbar styles entirely.

How do I hide the scrollbar but keep scrolling?

Use scrollbar-width: none (Firefox) and ::-webkit-scrollbar { display: none; } (Chromium). The element remains scrollable — only the visual scrollbar is hidden.

Can I style only one element's scrollbar?

Yes — scope your selector to the element, e.g. .my-div::-webkit-scrollbar. This overrides the global scrollbar style for just that container without affecting the rest of the page.