Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Rratschke
Last edited Jan 25, 2020
Created on Jan 25, 2020
Forked from HTML Cars Report

This example demonstrates basic SVG shapes—circles, rectangles, lines, and paths—styled using CSS. It shows how SVG elements can inherit styling from parent `<g>` groups and how CSS classes like `.lines` apply stroke properties. The code uses raw SVG markup with React as the rendering framework, featuring inline `fill` and `stroke` attributes alongside CSS rules. A transform group scales and translates the shapes, while a path with `stroke-linejoin: round` illustrates geometric line styling. The visualization highlights the interplay between SVG presentation attributes and external stylesheet rules.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes