Skip to content

Instantly share code, notes, and snippets.

@danott
Created September 13, 2010 14:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danott/577322 to your computer and use it in GitHub Desktop.
Save danott/577322 to your computer and use it in GitHub Desktop.
/*
* WEBKIT SCROLLBARS
*
* Testing the waters with this code...
* Technique found on http://elliottkember.com
*/
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
display: block;
height: 10px;
}
::-webkit-scrollbar-button:vertical:increment {
background-color: #fff;
background: transparent;
}
::-webkit-scrollbar-track {
-webkit-border-radius: 3px;
}
::-webkit-scrollbar-track-piece {
-webkit-border-radius: 3px;
}
::-webkit-scrollbar-thumb:vertical {
height: 50px;
background-color: #303030;
opacity: 0.5;
-webkit-border-radius: 3px;
position: relative;
}
::-webkit-scrollbar-thumb:horizontal {
width: 50px;
background-color: #303030;
-webkit-border-radius: 3px;
}
::-webkit-scrollbar-thumb:vertical:hover {
background-color: #ff00ff;
}
::-webkit-scrollbar-thumb:vertical:active, ::-webkit-scrollbar-thumb:vertical:focus{
background-color: #660066;
}
html {
overflow: auto;
}
@media only screen and (max-device-width:480px) {
html { overflow: auto; }
}
html {
overflow-x: hidden;
}
body {
position: absolute;
top: 0;
bottom: 0;
right: 10px;
overflow-y: scroll;
overflow-x: scroll;
width: 100%;
margin: 0;
}
@media only screen and (max-device-width:480px) {
body {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
overflow: auto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment