Skip to main content
100%

Fork of SVG Animations using CSS transitions

✓ Published0🌍 Public
JJuan Corrales Correyero
Last edited May 11, 2023
Created on May 11, 2023

A single red SVG rectangle animates its fill color and stroke width in response to mouse hover, smoothly transitioning over three seconds. The example demonstrates CSS transitions applied directly to SVG elements, using the `transition: all 3000ms` property on the `rect` selector and a `:hover` pseudo-class to trigger the visual change. The code defines a 960x500 SVG canvas with one 500x250 rectangle, and relies entirely on CSS rather than JavaScript libraries or animation APIs.

AI-generated description

Inspired by w3schools

MIT Licensed

Similar vizzes