Skip to content

Instantly share code, notes, and snippets.

@valhead
Created April 22, 2012 23:21
Show Gist options
  • Save valhead/2467467 to your computer and use it in GitHub Desktop.
Save valhead/2467467 to your computer and use it in GitHub Desktop.
Basic animation
/**
* Basic animation
*/
body {
background:#333;
padding: 6em;
}
div {
width:100px;
height:100px;
border-radius:20px;
background:#ff00ff;
-webkit-animation-name: rotate;
-webkit-transform-origin: 50% 50%;
-webkit-animation-duration: 1s;
-webkit-animation-timing-function: linear;
-webkit-animation-iteration-count: infinite;
}
@-webkit-keyframes rotate {
from {-webkit-transform:rotate(0deg);}
to {-webkit-transform:rotate(360deg);}
}
<!-- content to be placed inside <body>…</body> -->
<div></div>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment