scrollbar css style code example
Example 1: custom scrollbar
body::-webkit-scrollbar {
width: 12px;
}
body::-webkit-scrollbar-track {
background: orange;
}
body::-webkit-scrollbar-thumb {
background-color: blue;
border-radius: 20px;
border: 3px solid orange;
}
Example 2: css scrollbar
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
border-radius:10px;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
Example 3: scrollbar css
* {
scrollbar-width: thin;
scrollbar-color: blue orange;
}
*::-webkit-scrollbar {
width: 12px;
}
*::-webkit-scrollbar-track {
background: orange;
}
*::-webkit-scrollbar-thumb {
background-color: blue;
border-radius: 20px;
border: 3px solid orange;
}
Example 4: style scrollbar
*::-webkit-scrollbar {
width: 8px;
}
*::-webkit-scrollbar-thumb {
background-color: gray;
}
.selector {
scrollbar-width: none;
}
Example 5: coustomize srollbar
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
Example 6: scrollbar css style
body::-webkit-scrollbar {
width: 10px;
}
body::-webkit-scrollbar-track {
border-radius: px;
background: #c9cacc;
}
body::-webkit-scrollbar-track:hover {
background: #78797a;
}
body::-webkit-scrollbar-thumb {
background: #3d5585;
border-radius: 10px;
}
body::-webkit-scrollbar-thumb:hover {
background: #01143b;
}