Created
November 12, 2013 18:11
-
-
Save exarcheia-web/7435870 to your computer and use it in GitHub Desktop.
Basic Animation - Demo
This file contains hidden or 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
| /* 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; | |
| } |
This file contains hidden or 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
| <div class="box">Animate</div> |
This file contains hidden or 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
| // alert('Hello world!'); |
This file contains hidden or 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
| {"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