-
-
Save giuseppeg/5181018 to your computer and use it in GitHub Desktop.
Making an ugly range slider (webkit only)
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
/** | |
* Making an ugly range slider (webkit only) | |
*/ | |
input[type="range"] { | |
width: 100%; | |
height: 1em; | |
border-radius: 0.25em; | |
background-color: rgba(0, 0, 0, 0.05); | |
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1); | |
} | |
input[type="range"]::-webkit-slider-thumb { | |
width: 2.5em; | |
height: 2.5em; | |
border-radius: 100%; | |
background: lightgrey; | |
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); | |
cursor: pointer; | |
} | |
input[type="range"]:active::-webkit-slider-thumb { | |
box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.3), | |
inset 0 0 0 1px rgba(255, 255, 255, 0.8), | |
inset 0.75em 0.75em 8px rgba(0, 0, 0, 0.05); | |
} | |
input[type="range"], | |
input[type="range"]::-webkit-slider-thumb { | |
-webkit-appearance: none; | |
} |
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
<input type="range"> |
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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment