N
N
NewUser42422021-06-01 08:56:59
SVG
NewUser4242, 2021-06-01 08:56:59

How to animate an SVG line?

There is such an SVG. I'm trying to draw on hover.
But usually when animating SVG they use "dash", but here it does not work. Can someone tell me how to do it?

spoiler
<svg  width="21" height="162" viewBox="0 0 21 162" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <line x1="10.5" y1="12" x2="10.5" y2="159" stroke="#D2D7E1" stroke-width="2" stroke-linecap="round"
                                  stroke-dasharray="5 8"/>
                            <path d="M20 150L10.5 160.5L1.5 150" stroke="#D2D7E1" stroke-width="2" stroke-linecap="round"
                                  stroke-linejoin="round"/>
                            <circle cx="10" cy="6.5" r="5.5" transform="rotate(90 10 6.5)" stroke="#D2D7E1" stroke-width="2"/>
                        </svg>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lagudal, 2021-06-02
@lagudal

it's not entirely clear how exactly you want to animate, maybe this is how it works - it works on the hover of the svg area

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question