HTML and CSS Reference
In-Depth Information
50% {left: 300px; top: 0;}
to {left: 400px; top: 200px;}
}
#anim1 {-webkit-animation-name:resize;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: infinite;
position:absolute;
background-color: purple;}
#anim2 {-webkit-animation-name:move;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: 2;
position:absolute; top: 150px; left: 150px;
background-color: orange;}
</style>
</head>
<body>
<div id="anim1"> Watch me move and change size forever! </div>
<div id="anim2"> Watch me move two times </div>
</body>
</html>
O NLINE http://htmlref.com/ch6/animationiterationcount.html
Compatibility
CSS3 Proposed
Chrome 3+, Safari 3.1+
Notes
• WebKit supports this property as -webkit-animation-iteration-count .
• 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-name
This property is used to define the animations that should be run. The @keyframe directive
specified defines the properties to animate. The keyword none can be used to override
a cascade.
Syntax
animation-name: @keyframe-name | none [, @keyframe-name | none]*
where @keyframe-name is the name of the animation defined by an @keyframe directive.
Example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Search WWH ::




Custom Search