HTML and CSS Reference
In-Depth Information
<body>
<div id="anim1"> Watch me move and change size! </div>
</body>
</html>
O NLINE http://htmlref.com/ch6/animationdelay.html
Compatibility
CSS3 Proposed
Chrome 3+, Safari 3.1+
Notes
• WebKit supports this property as -webkit-animation-delay .
• Be careful staggering animations, as properties will revert to their nonanimation
values once the animation completes.
• Firefox 3.7 pre-releases show support for CSS transitions which are very related to
CSS animation. It is quite likely that a form of this property using the -moz prefix
may be supported in a Firefox browser by the time you read this.
animation-direction
This property is used to indicate if an animation plays in reverse or repeats itself every
other iteration.
Syntax
animation-direction: normal | alternate [,normal | alternate]*
The default value is normal .
Example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> CSS Animations - animation-direction </title>
<style type="text/css">
@-webkit-keyframes resize {
from {width: 100px; height: 300px;
left: 0; top: 0;}
50% {width: 100px; height: 100px;
left: 300px; top: 0;}
to {width: 300px;height: 100px;
left: 300px; top: 300px;}
}
#anim1 {-webkit-animation-name:resize;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: 5;
-webkit-animation-direction: alternate;
position:absolute;
background-color: purple;}
Search WWH ::




Custom Search