Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of SVG Animations using CSS transitions

Public visualization

Fork of SVG Animations using CSS transitions

0 stars0🌍 Public
Wwasti
Last edited Jan 22, 2023
Created on Jan 22, 2023

A single red SVG rectangle transitions its fill color and stroke width over three seconds when hovered. The example demonstrates CSS transitions applied directly to SVG elements via the `transition` property, with the `rect:hover` pseudo-class triggering the change. This static, inline HTML file uses no external JavaScript libraries, relying purely on CSS present in the style block. The rectangle starts with a thick black stroke and red fill, then shifts to green with a much thicker stroke on mouseover.

AI-generated description

Inspired by w3schools

Comments

Sign in to join the discussion.

MIT Licensed