SVG animation opacity on loop

前端 未结 2 1029
名媛妹妹
名媛妹妹 2021-02-01 07:11

I would like to make an svg path\'s opacity to go from 0 to 100 back to 0 and to 100 on a continuous loop.

So far i can get it to animate from 0 to 100 but not back agai

2条回答
  •  梦毁少年i
    2021-02-01 07:54

    You can animate any number of values using the values attribute, like this:

    
        
    
    

    That will animate from opacity 0 to opacity 1 (100%), and then back to 0 again, over the course of 1 second.

提交回复
热议问题