I'm trying to animate a circle when an SVG is loaded. It should:
Here is what I'm doing:
<svg width="36px" height="36px">
<circle r="1" cy="18" cx="18">
<animate attributeName="r" from="1" to="17" dur="1s" begin="1s"></animate>
</circle>
</svg>
But if you look at the result (and another option, included in the link) you can see it isn't working in either of them:
http://codepen.io/sheepysheep60/pen/Hjfdo
Can anyone shed any light on how to play the animation up until the end, then pause the animation, or is there a setting I'm missing?
Use fill="freeze"
:
<svg width="36px" height="36px">
<circle r="1" cy="18" cx="18">
<animate attributeName="r" from="1" to="17" dur="1s" begin="1s" fill="freeze"></animate>
</circle>
</svg>
See here for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With