Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
BBhavyatulasi
Last edited Jul 28, 2020
Created on Jul 28, 2020

This example demonstrates basic SVG shapes—circles, rectangles, lines, and paths—styled with CSS. It shows how SVG elements inherit presentation attributes like fill and stroke from parent `<g>` groups, and how CSS classes can override those defaults, as seen with the `.lines` class applying green strokes to the path. The code uses raw SVG markup within React, with explicit positioning and transform attributes to arrange the shapes.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes