What Is Scrollbar Thumb Height In CSS

What Is Scrollbar Thumb Height In CSS?

the height of the thumb is based in the size of content, you can change the width inside the ::-webkit-scrollbar but the height will always be based on the content.

::-webkit-scrollbar { /* 1 */ } 
::-webkit-scrollbar-button { /* 2 */ } 
::-webkit-scrollbar-track { /* 3 */ } 
::-webkit-scrollbar-track-piece { /* 4 */ } 
::-webkit-scrollbar-thumb { /* 5 */ }
 ::-webkit-scrollbar-corner { /* 6 */ } 
::-webkit-resizer { /* 7 */ }

 

Customized WebKit Scrollbar

::-webkit-scrollbar {
    width: 12px;
}
 
/* Track */
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    -webkit-border-radius: 10px;
    border-radius: 10px;
}
 
/* Handle */
::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(255,0,0,0.8); 
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}
::-webkit-scrollbar-thumb:window-inactive {
	background: rgba(255,0,0,0.4); 
}