Skip to main content
100%

Fork of SVG Animations using CSS transitions1

✓ Published0🌍 Public
Aalisaipsoc
Last edited Oct 5, 2022
Created on Sep 27, 2022

A single red rectangle with a thick yellow border occupies the center of an SVG canvas. When hovered over, the rectangle smoothly transitions its fill color to green and expands its border width to 100 pixels. The animation is implemented using pure CSS transitions applied to the SVG `<rect>` element, with a 3000-millisecond duration for all property changes. The example demonstrates how CSS properties like `fill` and `stroke-width` can animate SVG shapes without JavaScript.

AI-generated description

Inspired by w3schools

MIT Licensed

Similar vizzes