Serhio g. Lazin Serhio g. Lazin - 3 months ago 13
CSS Question

Css background color for scroll area

Is there a way to set color for scroll area? (marked with red)
enter image description here

Answer

You can do like this:

body::-webkit-scrollbar {
    width: 1em;
}

body::-webkit-scrollbar-track {
  background: red;
}

body::-webkit-scrollbar-thumb {
  background: darkgrey;
}

Only problem is that isnt supported on all browsers.

Comments