W
W
wakenbyWork2021-10-11 11:17:01
css
wakenbyWork, 2021-10-11 11:17:01

How to make animations inside svg inserted via img?

There are svg images like this:

Images

6163f189e067f619787593.png
6163f1cf3e04c164913037.png


They are inserted through the img tag. And the task came to make them an animation. So that on the chart with a rocket, the rocket moves and numbers appear in turn. On the second screen, the gears should be spinning and circles on the chart.

How can I do that? Now I'm trying to write css with animation in the svg itself. It is desirable that it works when scrolling with the appearance of a screen in the visibility area. This is somehow necessary to add js (But at the expense of triggering when scrolling, this is not necessary, just wondering if it is possible)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MeMoJlor, 2021-10-11
@wakenbyWork

Try opening the SVG file and pasting the code into the page without using img. Then find the desired element through devtools and animate it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question