Chrome, Edge, Safari and Opera support the non-standard ::-webkit-scrollbar pseudo element, which allows us to modify the look of the browser’s scrollbar.
Sources:
- https://www.facebook.com/christian.vanthof
- https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp
/* -- START custom scrollbar -- */
body::-webkit-scrollbar {
width: 1em;
}
body::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}
body::-webkit-scrollbar-thumb {
background-color: #8C0000;
outline: 1px solid slategrey;
}
/* -- END custom scrollbar -- */Code language: CSS (css)