Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
FFridayk7
Last edited Jul 2, 2020
Created on Jul 2, 2020
Forked from HTML Starter

This example displays an SVG canvas that fills the viewport and is styled with a red background using D3’s selection and `style` method. It demonstrates basic shape rendering within a React framework, leveraging D3 v5 to select the SVG element and apply CSS-based styling. The page includes a stylesheet with a `.highlighted` class that turns text red, though no shapes or data are actually drawn—only the empty SVG container and its background color change are shown. The code uses `d3.select` and raw SVG elements.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes