Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created February 4, 2011 21:02
Show Gist options
  • Save wookiehangover/811763 to your computer and use it in GitHub Desktop.
Save wookiehangover/811763 to your computer and use it in GitHub Desktop.
Super-dooper hot webkit only scroll bar. This will fallback to use the default styles in FF & IE
@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Custom Webkit scroll bar, super fucking dope
http://beautifulpixels.com/goodies/create-custom-webkit-scrollbar/ */
body { position:absolute; top:0px; left:0; bottom:0; right:10px; overflow-y:scroll; overflow-x:hidden;}
html {
overflow-y: auto;
background-color: transparent;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
height: 30px;
display: block;
background-color: transparent;
}
::-webkit-scrollbar-track-piece {
background-color: #eee;
-webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:vertical {
height: 50px;
background-color: #999;
-webkit-border-radius: 6px;
}
}
@impshum
Copy link

impshum commented Oct 13, 2014

Cheers.

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