Created
February 1, 2013 12:48
-
-
Save tiborsaas/4691105 to your computer and use it in GitHub Desktop.
CSS Based touch slider
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
/** | |
* CSS Based touch slider | |
*/ | |
#slider{ | |
width: 300px; | |
height: 40px; | |
border: 1px solid #999; | |
margin: auto; | |
margin-top: 100px; | |
overflow: hidden; | |
-webkit-overflow-scrolling: touch; | |
} | |
#track{ | |
width: 200%; | |
height: 40px; | |
background: #eee; | |
} | |
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
<div id="slider"> | |
<div id="track">test test test test</div> | |
</div> | |
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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"80","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment