css change scroll bar code example
Example 1: how to style scrollbar in div
#style-1::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: #F5F5F5;
}
#style-1::-webkit-scrollbar
{
width: 12px;
background-color: #F5F5F5;
}
#style-1::-webkit-scrollbar-thumb
{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #555;
}
Example 2: custom scroll bar
*::-webkit-scrollbar {
width: 10px;
}
*::-webkit-scrollbar-track {
background: #f1f1f1;
}
*::-webkit-scrollbar-thumb {
background: #888;
}
*::-webkit-scrollbar-thumb:hover {
background: #555;
}
Example 3: css edit scroll bar
::-webkit-scrollbar{width:6px;border-left:1px solid #E6ECF8;}
::-webkit-scrollbar-thumb{background-color:#d6872c;}