Introduction
I know some basic animation techniques for SVG
using both Javascript
and DOM <animate>
element. So I have created this SVG, but I can't figure it out how trigger the animation every x seconds without too much code. I tried begin="4s"
but it only wait the first time.
Question:
There is a DOM property like begin
or dur
, but to define an interval in seconds? Which is the better way to achieve this?
What I have tried:
<animateTransform attributeName="transform" additive="sum" attributeType="XML"
type="rotate" dur="1s" repeatCount="indefinite" from="0 54.2 43.3"
to="360 54.2 43.3" begin="3s" fill="freeze"/>
Complete example here: SVG Fiddle
Notes:
- I already checked SVG Spec
- Add some Javascript code is an option
- Using CSS3 is an option too