Restart background SVG animation

后端 未结 7 1939
广开言路
广开言路 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条回答
  • 2021-01-01 20:57

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

    <object type="image/svg+xml" data="my.svg"></object>
    

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

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