Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Ssourcebox-bug
Last edited Apr 10, 2019
Created on Apr 10, 2019

This example demonstrates a collection of geometric SVG shapes styled through CSS, showcasing how vector primitives can be visually customized. The code initializes an SVG canvas with a fixed width and height, then relies on CSS rules to define stroke colors, line joins, and line caps for path elements. It uses D3 version 5 to select the SVG element, though the visible JavaScript is incomplete. The stylesheet applies a dark teal stroke and rounded line endings to all paths within a `.lines` class, while the body has no margin to maximize the canvas display area.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes