Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published0🌍 Public
EElvira
Last edited Aug 2, 2019
Created on Aug 2, 2019

This example demonstrates how SVG shapes and CSS styling can be combined to create a static, colorful composition. It shows a blank 960x500 SVG canvas with a pink background, rendered as a single empty graphic. The visualization uses d3.select to target the SVG element and applies a background color via the style method, while an external stylesheet sets the page margin and overflow. The code relies on D3 v5 and SVG, with a linked bundle.js file that contains the selection logic.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes