Skip to content

Instantly share code, notes, and snippets.

@exarcheia-web
Created November 12, 2013 18:11
Show Gist options
  • Save exarcheia-web/7435870 to your computer and use it in GitHub Desktop.
Save exarcheia-web/7435870 to your computer and use it in GitHub Desktop.
Basic Animation - Demo
/* Basic Animation - Demo */
* {box-sizing: border-box}
.box {
background: hotpink;
color: white;
text-shadow: 0 1px 1px black;
box-shadow: 0 0 5px #999;
width: 150px;
height:150px;
line-height: 150px;
text-align: center;
font-family: Georgia;
font-size: 2em;
border-radius: 50%;
position: relative;
-webkit-animation: move 3s infinite;
animation: move 3s infinite;
}
@keyframes move {
from { left: 0; background: red; }
35% { left: 600px; top: 0; background: hotpink; }
40% { left: 650px; }
50% { left: 600px; top: 150px; background: magenta; }
85% { left:0; top: 150px; background: orange; }
to { left: 0; top: 0; background: yellow; }
}
body:hover .box {
animation-play-state: paused;
}
<div class="box">Animate</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment