Skip to main content
100%

SVG Fundamentals

✓ Published0🌍 Public
BBen Gerber
Last edited Aug 22, 2024
Created on Aug 22, 2024
Forked from HTML Starter

This example demonstrates fundamental SVG graphics by rendering a single red rectangle with a thick black border in a 960x500 viewport. The visualization shows how CSS styling and hover interactions directly control SVG properties, with the rectangle smoothly transitioning to green and a thinner border over three seconds when hovered. The code uses inline CSS within an HTML page, employing the `transition` property and `:hover` pseudo-class to animate SVG element attributes, specifically targeting the `<rect>` element's `fill` and `stroke-width`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes