Skip to content

Instantly share code, notes, and snippets.

@wir
Forked from spemer/customize-scrollbar.css
Created April 29, 2021 16:41
Show Gist options
  • Save wir/1a3b61483743eb6113d9129ddea0b510 to your computer and use it in GitHub Desktop.
Save wir/1a3b61483743eb6113d9129ddea0b510 to your computer and use it in GitHub Desktop.
Customize website's scrollbar like Mac OS. Not supports in Firefox and IE.
/* Customize website's scrollbar like Mac OS
Not supports in Firefox and IE */
/* total width */
body::-webkit-scrollbar {
background-color: #fff;
width: 16px;
}
/* background of the scrollbar except button or resizer */
body::-webkit-scrollbar-track {
background-color: #fff;
}
/* scrollbar itself */
body::-webkit-scrollbar-thumb {
background-color: #babac0;
border-radius: 16px;
border: 4px solid #fff;
}
/* set button(top and bottom of the scrollbar) */
body::-webkit-scrollbar-button {
display:none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment