JS animate() 学习

animate(keyframes,options)

  1. 关键帧 

    1/ 如果是过渡动画 直接就写效果 eg: { transform: 'rotate(360deg)' }

    2/ 关键帧数组 使用数组报过对象 eg: [{transform: 'translateX(400px)'},{transform: 'translateX(300px)'},{transform: 'translateX(20px)'}]

  2. 动画属性

    1/ delay 延迟

    2/ direction 动画方向

    3/ duration 持续时间

    4/ easing 动画速率

    5/ endDelay

    6/ fill 结束时复位

    7/ interationStart 

    8/ interations 重复次数 默认1 无限 ‘Infinity’

    9/ composite

    

posted on 2024-10-07 17:38  贲风  阅读(897)  评论(0)    收藏  举报