Created
March 16, 2014 08:58
-
-
Save tomswatermelon/9580394 to your computer and use it in GitHub Desktop.
Webkit scrollbar customization
This file contains hidden or 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
/* For the "inset" look only */ | |
html { | |
overflow: auto; | |
} | |
body { | |
position: absolute; | |
top: 20px; | |
left: 20px; | |
bottom: 20px; | |
right: 20px; | |
padding: 30px; | |
overflow-y: scroll; | |
overflow-x: hidden; | |
} | |
/* Let's get this party started */ | |
::-webkit-scrollbar { | |
width: 12px; | |
} | |
/* Track */ | |
::-webkit-scrollbar-track { | |
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); | |
-webkit-border-radius: 10px; | |
border-radius: 10px; | |
} | |
/* Handle */ | |
::-webkit-scrollbar-thumb { | |
-webkit-border-radius: 10px; | |
border-radius: 10px; | |
background: rgba(255,0,0,0.8); | |
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); | |
} | |
::-webkit-scrollbar-thumb:window-inactive { | |
background: rgba(255,0,0,0.4); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment