dd

CSS3 animation(动画) 属性


实例

使用简写属性把 animation 绑定到一个<div> 元素:

div
{
animation:mymove 5s infinite;
-webkit-animation:mymove 5s infinite; /* Safari 和 Chrome */
}
运行一下 »

浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10, Firefox, 和 Opera 支持 CSS3 animation(动画)属性.

Safari和Chrome通过私有属性-WebKit-animation支持。

注意: Internet Explorer 9 及更早IE版本不支持动画属性。

默认值:none 0 ease 0 1 normal
继承:no
版本:CSS3
JavaScript 语法:object.style.animation="mymove 5s infinite"

语法

animation: animation: name duration timing-function delay iteration-count direction fill-mode play-state;;


说明
animation-name指定要绑定到选择器的关键帧的名称
animation-duration动画指定需要多少秒或毫秒完成
animation-timing-function设置动画将如何完成一个周期
animation-delay设置动画在启动前的延迟间隔。
animation-iteration-count定义动画的播放次数。
animation-direction指定是否应该轮流反向播放动画。