Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Llukastieber
Last edited Aug 7, 2020
Created on Aug 7, 2020
Forked from React Starter

This example demonstrates basic SVG shapes—circles, rectangles, lines, and a path—arranged in a grid and styled entirely through CSS. It shows how SVG elements inherit presentation attributes like `fill` and `stroke` from parent groups and stylesheets, with a nested `g` element applying blue fills and black strokes. The code uses raw SVG markup inside an HTML file, with a separate stylesheet defining stroke widths and colors for the path elements. The rendering approach is pure SVG, with no JavaScript or external libraries involved.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes