Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Gginnyching
Last edited Oct 1, 2022
Created on Oct 1, 2022
Forked from Hello VizHub

This example demonstrates basic SVG shapes—circles, rectangles, lines, and paths—styled through both inline attributes and external CSS classes. The code shows how fill colors can be set via hex, RGB, or named values, and how CSS rules like `.lines` apply stroke properties. It uses plain SVG markup without D3 dependencies, though the README notes the project can load D3 via UNPKG and supports ES6 module imports. The rendering approach uses a transformed `<g>` element to scale and position all shapes.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes