I am trying to style a scrollbar using css and I want to achieve the following look (ignore the background):
In other words, I want the thumb to be thicker than
Simple CSS solution to show handle thicker than track. It works fine in Chrome only. It may help for someone who needs this.
/* To set scrollbar width */
::-webkit-scrollbar {
width: 5px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 9px;
border: 2px solid white; /* Use your background color instead of White */
background-clip: content-box;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 9px;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}