Skip to content

Instantly share code, notes, and snippets.

@nigelheap
Created May 29, 2011 22:59
Show Gist options
  • Save nigelheap/998213 to your computer and use it in GitHub Desktop.
Save nigelheap/998213 to your computer and use it in GitHub Desktop.
/* Scrollbar for webkit browsers only
******************************************/
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-width: 1024px) {
html {overflow-y: auto; background-color: transparent;}
body {position: absolute; top: 0; left: 0; bottom: 0; right: 10px; overflow-y: scroll; overflow-x: hidden;}
}
::-webkit-scrollbar { width: 8px; height: 10px; }
::-webkit-scrollbar-button:start:decrement { display: block; width: 5px; height: 5px; background-color: transparent; }
::-webkit-scrollbar-button:end:increment { display: block; width: 5px; height: 5px; background-color: transparent; }
::-webkit-scrollbar-track:enabled { background-color: transparent; }
::-webkit-scrollbar-track-piece { background-color: transparent; border: none; margin: 8px 0 8px 0; }
::-webkit-scrollbar-thumb:vertical { height: 30px; background-color: rgba(0, 0, 0, 0.5); -webkit-border-radius: 5px; -webkit-box-shadow: 0 1px 1px rgba(255,255,255,0.2) }
::-webkit-scrollbar-thumb:horizontal { width: 30px; background-color: rgba(0, 0, 0, 0.5); -webkit-border-radius: 5px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment