Skip to content

Instantly share code, notes, and snippets.

@Faisalaziz
Forked from JuanMaRuiz/Scrollbar.css
Created August 19, 2017 12:43
Show Gist options
  • Select an option

  • Save Faisalaziz/a1deb6d484ad7bac304dc549f2713bdc to your computer and use it in GitHub Desktop.

Select an option

Save Faisalaziz/a1deb6d484ad7bac304dc549f2713bdc 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment