Some Examples » 30. SVG gradient animation
30. SVG gradient animation
Most SVG elements are animatable, including SVG gradients.
Code component
Here the SVG <circle>
’s horizontal position is animated (cx
), together with the radii (fr
and r
) of the <radialGradient>
’s start and end circles, plus also the position of its smallest (yellow) circle (fx
and fy
).
Code override
How do you animate an SVG with a code override? By inserting the SVG as its children
:
Other examples of using children
in a code override: