Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published0🌍 Public
Ssammytheindi
Last edited Dec 11, 2019
Created on Dec 11, 2019

This example shows how to build SVG shapes and style them with CSS, using D3.js to select and manipulate the SVG container. The page renders a blank 960 by 500 pixel SVG element and applies black stroke styling to line groups, with rounded path strokes in a teal color. The code imports `select` from d3 v5 and uses CSS classes to control line thickness, stroke color, and line join/cap styles. The minimal setup demonstrates the interplay between D3 selections and external stylesheets for visual presentation.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes