I am trying to style up a custom scrollbar that works in Chrome and Safari. I’ve tried the following CSS:
::-webkit-scrollbar {
width: 15px;
}
::-webkit-scrollbar-track {
background-color: rgba(100, 100, 100, .5);
width: 15px;
}
::-webkit-scrollbar-thumb {
background-color: #818B99;
border-radius: 9px;
width: 9px;
}
However the width
on the -webkit-scrollbar-thumb
is being ignored. I would like the thumb to be thinner than the track, as above.
It appears that I can fake the width by setting a border on the -webkit-scrollbar-thumb
of 3px with the same colour as the track, however this only works with an opaque background colour, and I need it to work with a transparent colour for the track as above.
Example jsfiddle: http://jsfiddle.net/L6Uzu/1/