change scrollbar color css for all browsers code example
Example 1: change scrollbar color
.scrollable-element {
scrollbar-color: red yellow; /* red is for the thumb and yellow is for the track */
}
Example 2: custom scroll bar
/* width */
*::-webkit-scrollbar {
width: 10px;
}
/* Track */
*::-webkit-scrollbar-track {
background: #f1f1f1;
}
/* Handle */
*::-webkit-scrollbar-thumb {
background: #888;
}
/* Handle on hover */
*::-webkit-scrollbar-thumb:hover {
background: #555;
}