CSS scrollbar-color Property


The scrollbar-color CSS property is used to customize the color of the scrollbar in web browsers. It allows web developers to specify two values: the color of the thumb (the draggable part of the scrollbar) and the color of the track (the background of the scrollbar). This property helps in enhancing the visual aesthetics and user experience of web pages by allowing designers to match the scrollbar's appearance with the overall design of the website. However, it's important to note that not all web browsers support this property, so it may not have consistent behavior across all platforms.

Initial value
Applies to
scrolling boxes
Computed value
as specified
by computed value type
JavaScript syntax


scrollbar-color: auto | <color>{2}  


  • autoDefault platform rendering for the track portion of the scrollbar, in the absence of any other related scrollbar color properties.
  • <color>{2}Applies the first color to the scrollbar thumb, the second to the scrollbar track.


<div class="scroller">
Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion
daikon amaranth tatsoi tomatillo melon azuki bean garlic. Gumbo beet greens
corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts
fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber
earthnut pea peanut soko zucchini.
.scroller {
  width: 300px;
  height: 100px;
  overflow-y: scroll;
  scrollbar-color: #007 #bada55;

Browser Support

The following table will show you the current browser support for the CSS scrollbar-color property.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 31st December 2023