Skip to content

Instantly share code, notes, and snippets.

@jordangray
Created February 27, 2012 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordangray/1925374 to your computer and use it in GitHub Desktop.
Save jordangray/1925374 to your computer and use it in GitHub Desktop.
Messing about with keyframe animation
/**
* 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;
}
<div class="orbit">Test</div>
{"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