Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Vvic126
Last edited Jun 23, 2020
Created on Jun 23, 2020
Forked from HTML Cars Report

This example renders a static composition of SVG shapes—circles, rectangles, lines, and a path—on a 960×500 canvas. It demonstrates how CSS classes and inline attributes control visual styling, such as fill colors, stroke widths, and line joins. The SVG is scaled with a transform, and elements are grouped using `<g>` tags to apply shared styling like white fill with green strokes. The code uses raw SVG syntax, including the `d` attribute for the path’s move-to and line-to commands, and a linked stylesheet assigns stroke properties to the line and path groups. No external libraries are used.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes