Created
September 20, 2012 19:10
-
-
Save tobaco/3757753 to your computer and use it in GitHub Desktop.
Style Scrollbars in Webkit (example from dabblet.com)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Style scrollbars in Webkit | |
* Warning: nonstandard CSS ahead | |
*/ | |
::-webkit-scrollbar { | |
width: 20px; | |
height: 20px; | |
} | |
section.page:not(.focus):not(:hover)::-webkit-scrollbar { | |
display: none; | |
} | |
::-webkit-scrollbar-track, | |
::-webkit-scrollbar-thumb { | |
border-radius: 999px; | |
border: 5px solid transparent; | |
} | |
::-webkit-scrollbar-track { | |
box-shadow: 1px 1px 5px rgba(0,0,0,.2) inset; | |
} | |
::-webkit-scrollbar-thumb { | |
min-height: 20px; | |
background: url(/img/noise.png); | |
background-clip: content-box; | |
box-shadow: 0 0 0 5px hsla(24, 20%, 50%,.4) inset; | |
} | |
::-webkit-scrollbar-corner { | |
background: transparent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment