Skip to content

Instantly share code, notes, and snippets.

@JuanMaRuiz
Last active August 31, 2019 02:20
Show Gist options
  • Save JuanMaRuiz/7927982 to your computer and use it in GitHub Desktop.
Save JuanMaRuiz/7927982 to your computer and use it in GitHub Desktop.
Customize the scrollbar of the web like Gmail with only css. [Chrome and Safari]
::-webkit-scrollbar {
background: transparent;
overflow: visible;
width: 17px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
border: solid #fff;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.8);
}
::-webkit-scrollbar-thumb:horizontal {
border-width: 4px 6px;
min-width: 40px;
}
::-webkit-scrollbar-thumb:vertical {
border-width: 6px 4px;
min-height: 40px;
}
::-webkit-scrollbar-track-piece {
background-color: #fff;
}
::-webkit-scrollbar-corner {
background: transparent;
}
::-webkit-scrollbar-thumb {
background-color: #ADADAD;
-webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,0.10),inset 0 -1px 0 rgba(0,0,0,0.07);
}
::-webkit-scrollbar-thumb:hover {
background-color: #999;
}
Copy link

ghost commented Mar 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment