Skip to content

Instantly share code, notes, and snippets.

@ryoco
Created November 21, 2012 07:17
Show Gist options
  • Save ryoco/4123548 to your computer and use it in GitHub Desktop.
Save ryoco/4123548 to your computer and use it in GitHub Desktop.
rotation animation
<html>
<head>
<style type="text/css" rel="stylesheet">
#root{
width:480px;
height:480px;
overflow:hidden;
position:relative;
margin: 0 auto;
}
body{
padding:0;
margin: 0;
}
#background img{
-webkit-animation-name: rotation;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-webkit-animation-duration: 4s;
}
@-webkit-keyframes rotation {
0% {-webkit-transform: scale(2) rotate(0deg);}
100% {-webkit-transform: scale(2) rotate(360deg);}
}
</style>
</head>
<body>
<div id="root">
<div id="background"><img width="480" height="480" src="rotation.png" /></div>
</div>
</div></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment