Skip to main content
100%

SVG Animations

✓ Published0🌍 Public
Zzemui
Last edited Nov 6, 2023
Created on Nov 6, 2023
Forked from HTML Starter

This example shows a single red rectangle centered on a blank SVG canvas. Hovering the mouse over the rectangle triggers a smooth CSS transition that changes its fill color to green and expands its stroke thickness from 20 to 100 pixels over 3 seconds. The code uses raw SVG elements inside an HTML page, relying on the CSS `transition` property to animate the state change. The rectangle’s starting dimensions and position are set via SVG attributes, while the hover effect is defined using the `:hover` pseudo-class.

AI-generated description
MIT Licensed

Similar vizzes