Search code examples
htmlcsswebkitscrollbar

webkit scrollbar with transparent background


I have a little list with content, that I want to make with max-height and scrollbar, but there is one problem. I want to make it a custom scrollbar. There's is my JSFiddle. I can't set a transparent background and track color

There is my Scrollbar CSS

.uploaded-files::-webkit-scrollbar{
    -webkit-appearance: none;
    width: 11px;
}

.uploaded-files::-webkit-scrollbar-track{
    margin: 7px 0;
}

.uploaded-files::-webkit-scrollbar-thumb{
    border-radius: 12px;
    border: 4px solid rgba(255,255,255,0);
    background-clip: content-box;
    background-color: #a0a0a0;
}

I want to make a scrollbar, like this in this image

enter image description here

Any solutions?


Solution

  • Im using a jQuery scrollbar now, and it works very well, and this is my solution, for my own question.