Created
October 6, 2014 09:35
-
-
Save csssecrets/b7b53efcc2f933ca6d54 to your computer and use it in GitHub Desktop.
Smooth state animations
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
/** | |
* Smooth state animations | |
* Photo credits: https://www.flickr.com/photos/employtheskinnyboy/3904743709 | |
*/ | |
@keyframes panoramic { | |
to { background-position: 100% 0; } | |
} | |
.panoramic { | |
width: 150px; height: 150px; | |
background: url('http://c3.staticflickr.com/3/2671/3904743709_74bc76d5ac_b.jpg'); | |
background-size: auto 100%; | |
animation: panoramic 10s linear infinite alternate; | |
animation-play-state: paused; | |
} | |
.panoramic:hover, .panoramic:focus { | |
animation-play-state: running; | |
} |
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 class="panoramic"></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":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment