Created
February 27, 2012 16:52
-
-
Save jordangray/1925374 to your computer and use it in GitHub Desktop.
Messing about with keyframe animation
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
/** | |
* Messing about with keyframe animation | |
*/ | |
@keyframes rot { | |
0% { | |
opacity: 0; | |
transform: rotate(0deg); | |
} | |
25% { | |
opacity: 1 | |
transform: rotate(90deg); | |
} | |
75% { | |
opacity: 1 | |
transform: rotate(270deg); | |
} | |
100% { | |
opacity: 0; | |
transform: rotate(360deg); | |
} | |
} | |
.orbit { | |
left: 200px; | |
top: 100px; | |
position: absolute; | |
} | |
.orbit:before { | |
border-bottom: 4px solid #fff; | |
content: ""; | |
display: inline-block; | |
height: 20px; | |
margin: 0 10px 0 0; | |
width: 20px; | |
vertical-align: middle; | |
} | |
.orbit:hover:before { | |
border-bottom: 4px solid #aeF; | |
border-radius: 20px; | |
animation: rot 1s 0 infinite linear; | |
} |
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="orbit">Test</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
{"view":"split","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment