Danny Danny - 3 months ago 17
CSS Question

css scrollbar top and bottom corner not changing

enter image description here

ul.list_view::-webkit-scrollbar {
background: lightyellow;
width: 12px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px #57c5a0;
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background:#57c5a0;
-webkit-box-shadow: inset 0 0 6px #000000;
}


Hi.This is the code for customizing my scrollbar.As you can see in top corner,and also in bottom corner of the scrollbar, there is still a white space..I don't know how to make it disappear.Please help.

Answer

It's not white, but lightyellow as specified in your css. You simply need to change the background from lightyellow to transparent.

ul::-webkit-scrollbar {
    background: transparent;
}

If you're looking to have a completely transparent track, also remove the box-shadow from ::-webkit-scrollbar-track.