animation-duration
介绍
用于设置动画持续的时间。
标准化语法
//默认值0
animation-duration: <time>;
1
2
2
样例:
/* Single animation */
animation-duration: 6s
animation-duration: 120ms
/* Multiple animations */
animation-duration: 1s, 15s
animation-duration: 10s, 30s, 230ms
1
2
3
4
5
6
7
2
3
4
5
6
7
与 Web 的区别
注意
- animation 仅支持对transform, background-color, opacity做动画
扩展阅读
- animation
- animation-name
- animation-duration
- animation-timing-function
- animation-delay
- animation-iteration-count
- animation-direction
- animation-fill-mode
- animation-play-state
注意事项
- 如果是动态设置的动画属性,需要在节点标记
flatten="false"
属性 - 如果 iOS 显示效果不符合预期,在节点标记
implicit-animation="false"
属性