🌍 Public
Viewing a saved revision (read-only)
86b59e00f89a41a49e8406a6e70049c4
Fork of SVG Animations using CSS transitions
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 descriptionInspired by w3schools