Select Page

Category: SVG Animation

Draw SVG – GSAP

Draw SVG – GSAP

Here is an example using GSAP’s Draw SVG plugin to draw an SVG path. See the Pen Draw SVG – GSAP by Puneet Sharma (@webdevpuneet) on CodePen.
Animating element inside SVG over a path using CSS

Animating element inside SVG over a path using CSS

You can easily create a path over the surface using Figma or similar software. First you will need to give the animating object some id or class then place it to the top left position of the SVG using the transform: translated() method and apply the following CSS...

Eye SVG/CSS Animation

You can apply the following css to your SVG to animate it. For eyes, you will need to measure transform-origin i.e. distance of the center of each eye from the top and leftmost part of the SVG. /* Keyframes */ @keyframes eyes { 0%{ transform: scale(1,1); } 27.5%{...

Eyelids SVG/CSS animation

CSS @keyframes eyelids { 0%{ transform: translateY(0px); } 27.5%{ transform: translateY(2px); } 30%{ transform: translateY(2px); } 35%{ transform: translateY(0px); } 45%{ transform: translateY(0px); } 100%{ transform: translateY(0px); } } #left-eyelid, #right-eyelid...