M
M
motr2018-08-01 15:45:31
css
motr, 2018-08-01 15:45:31

How to animate drawing of svg line from point to point?

Help me figure it out, or poke into a good tutorial on svg animation.
There is svg . Task:
The line is not initially visible. When you hover over a point, the line comes out of it and is drawn to the end.
5b61aa8256510085608814.png
So far it turned out like this codepen

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2018-08-01
@motr

To do this you will need the morphSVG plugin, with it you can transform your svg however you want. In your case, so that the line first goes to the bottom, then to the side.
That is, your d will change like this:
initial state: d="M272.2.3"
state 2: d="M272.2.3l-61 93"
state 3: d="M272.2.3l-61 93H0"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question