Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Wwindsoftheo
Last edited Dec 18, 2020
Created on Dec 17, 2020
Forked from HTML Cars Report

This example shows how to compose basic SVG shapes—circles, rectangles, lines, and paths—within a grouped, scaled canvas. It demonstrates applying both inline attributes and CSS classes to control fill, stroke, and stroke-width, with different styling for inherited properties versus explicit overrides. The code uses raw SVG elements and external CSS, with no JavaScript or D3 APIs, relying on the `g` transform to scale and translate the shapes. The rendering is purely static SVG, illustrating simple declarative vector graphics.

AI-generated description

An example module on using arrays and modules.

MIT Licensed

Similar vizzes