overflow scroll change scrollbar code example
Example 1: customize scrollbar css
// scroll bar
::-webkit-scrollbar {
background-color: hsl(235, 24%, 19%);
width: 8px;
}
::-webkit-scrollbar-track {
background-color: hsla(235, 21%, 11%, 0.322);
box-shadow: 0 0 3px hsl(235, 21%, 11%);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background-color: hsl(235, 21%, 11%);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: hsl(220, 98%, 61%);
}
Example 2: css beutify scroller
body::-webkit-scrollbar {
width: 1em;
}
body::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}
body::-webkit-scrollbar-thumb {
background-color: darkgrey;
outline: 1px solid slategrey;
}