How to reverse the moving direction of the SVG animation on the ?

前端 未结 1 1905
终归单人心
终归单人心 2020-12-20 05:46

http://codepen.io/KeliChiu/pen/gabNWM Hi, I am trying to reverse the moving direction of the two red dots along the path in the SMIL SVG animation. For all the attribute I

1条回答
  •  忘掉有多难
    2020-12-20 05:54

    The simplest way is to use the keyTimes and keyPoints attributes to tell the animation to run backwards.

    keyPoints="1;0" keyTimes="0;1"
    

    Here we are telling the animation to be at position "1" on the path (the end) at time 0, and position 0 (the start) at the end of the animation.

    Demo:

    
    
        
        
    
        
            
                
            
        
        
            
                
            
        
    

    0 讨论(0)
提交回复
热议问题