Answer the question
In order to leave comments, you need to log in
How to change SVG image using js?
I have an SVG image and I need an animation for a countdown timer. I want to make this circle shorter by 1/60 every second.
<svg viewBox="0 0 200 200" preserveAspectRatio="none" class="progress-seconds">
<circle cx="100" stroke-dasharray="0 0" cy="100" r="42" id="progress-seconds" fill="none" stroke="#ff7323" stroke-width="10" transform="rotate(-90,100,100)"></circle>
</svg>
Answer the question
In order to leave comments, you need to log in
CSS is enough here (stroke-dashoffset animation), JS in this example is only responsible for displaying the value of the counter inside the circle:
Original:
https://codepen.io/zebateira/pen/VvqJwm
Search query:
https://www.google.com/search?q=svg+timer+circle&o...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question