使用频率 | 中 |
所属模块 | Std.animation.keyframes |
成员类型 | 公有成员函数 |
Number duration();
Object duration(Number value);
Object duration(String time);
名称 | 类型 | 描述 |
value | Number | 动画持续的时间数字,毫秒 |
time | String | 带有单位的时间字符串,例如1s,1000ms等 |
1. 当前的动画持续时间数字(毫秒)
2. this对象
var keyframes = new Std.animation.keyframes({
rules:{
from:{
left:10
},
to:{
left:100
}
}
});
keyframes.duration(2000);
keyframes.start();