Restart background SVG animation

后端 未结 7 2141
广开言路
广开言路 2021-01-01 20:20

I have an SVG set as a background image of an element. The first time the element is displayed, the animation plays correctly.

On subsequent displays (e.g. if a dupl

7条回答
  •  萌比男神i
    2021-01-01 20:57

    As @netsurfer said, I solved this issue by using an object. Here is an example:

    
    

    Every time I dynamically inject the SVG object the animation starts from the beginning.

提交回复
热议问题