Now use this code(and many variations of this), but scroll track get dark-grey color, something like #222222 or near this. Find many examples, but all of them give same result. Opera, Chrome and firefox show this bug. How to fix?
#style-3::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: transparent;
}
#style-3::-webkit-scrollbar
{
width: 6px;
background-color: transparent;
}
#style-3::-webkit-scrollbar-thumb
{
background-color: #000000;
}
To control the
background-color
of the scrollbar you need to target the primary element, instead of-track
I haven't succeed in rendering it
transparent
, but i did manage to set it's color.Since this is limited to webkit, it is still preferable to use js with a polyfill: CSS customized scroll bar in div
With pure css it is not possible to make it transparent. You have to use transparent background image like this:
Try this one, it works fine for me.
In CSS:
and here is the working demo: https://jsfiddle.net/qzsbf0tm/
Just set display:none; as an attribute in your stylesheet ;) It's way better than loading pictures for nothing.