🌍 Public
Viewing a saved revision (read-only)
272aa74c86f24f109bb13b5f9a37d9d6
Shapes with SVG and CSS
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 descriptionA bare minimum HTML page.
See also React Starter.