Skip to main content
100%

Shapes with SVG & CSS

✓ Published2🌍 Public
JJuanRomero1016
Last edited Oct 8, 2020
Created on Oct 7, 2020
Forked from HTML Starter

This example shows a collection of SVG shapes—circles, rectangles, lines, and a path—styled through both inline attributes and an external CSS file. It demonstrates how SVG elements inherit CSS properties like stroke and fill, and how grouped elements apply shared styling via the `<g>` element. The code uses plain React with JSX to render the SVG, leveraging SVG attributes such as `transform` for scaling and translation. CSS classes like `.lines` style the path and line stroke colors, while inline fills override defaults for specific shapes.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes