Created
January 31, 2014 17:45
-
-
Save WebPlatformDocs/8738459 to your computer and use it in GitHub Desktop.
Webplatform example for http://docs.webplatform.org/wiki/css/properties/animation-name,
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
/* | |
* Webplatform example for http://docs.webplatform.org/wiki/css/properties/animation-name, | |
amimation-duration, animation-iteration-count, animation-direction | |
*/ | |
div { | |
width: 5em; | |
height: 5em; | |
margin: 20px; | |
background: blue; | |
animation-name: pulse; | |
-webkit-animation-name: pulse; | |
animation-duration: 1s; | |
-webkit-animation-duration: 1s; | |
animation-iteration-count: infinite; | |
-webkit-animation-iteration-count: infinite; | |
animation-direction: normal; | |
-webkit-animation-direction: reverse; | |
} | |
@-webkit-keyframes pulse { | |
from { | |
transform : translate3d(100px,0px,0px); | |
} | |
50% { | |
transform : translate3d(200px,0px,0px); | |
} | |
to { | |
transform : translate3d(0px,0px,0px); | |
} | |
} |
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
<div class="selected"></div> | |
<p>This example shows how to use CSS animations to "pulse" an element | |
on the page.</p> |
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
console && console.log("Web Platform Docs 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
{"view":"split-vertical","fontsize":"90","seethrough":"","prefixfree":"","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment