Can I set the progress of a keyframe animation to a specific stage?

后端 未结 2 1062
灰色年华
灰色年华 2021-02-19 03:21

I have a keyframe animation with multiple steps:

@keyframes rotateLeftSideCustom {
    0% {
    }
    40% {
        -webk         


        
2条回答
  •  我寻月下人不归
    2021-02-19 04:07

    You could use jQuery for animation. With .animate() you have a property step.

    animate API

    From the docs:

    
    
    
      
      animate demo
      
      
    
    
    
    

    Where *now* is the actual state of your animation.

    UPDATE

    Propably you can use requestAnimationFrame but this is also like my other solution. The difference is - that it's pure JavaScript, so no external library needed.

提交回复
热议问题