Created
August 1, 2013 09:33
-
-
Save SFantasy/6129905 to your computer and use it in GitHub Desktop.
CSS animation example
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
.row > a#transform { | |
text-decoration: none; | |
width: 40px; | |
height: 40px; | |
display: inline-block; | |
text-align: center; | |
position:relative; | |
} | |
@keyframes 't' { | |
from { | |
transform: rotate(0deg); | |
} | |
to { | |
transform: rotate(360deg); | |
} | |
} | |
@-webkit-keyframes 't' { | |
from { | |
-webkit-transform: rotate(0deg); | |
} | |
to { | |
-webkit-transform: rotate(360deg); | |
} | |
} | |
.row > #transform:hover { | |
animation: t 1s infinite alternate; | |
-webkit-animation: t 1s infinite alternate; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="row"> | |
<a href="#" id="transform">BLOG</a> | |
</div> | |
<script src="lab.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment