Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published0🌍 Public
SShihao Ran
Last edited Oct 3, 2019
Created on Oct 3, 2019

This example uses SVG and D3 v5 to draw a smiling face with a yellow circle, two black eyes, and a mouth created with the `d3.arc` path generator. The page renders fixed geometric shapes in a 960x500 viewport, with CSS setting a red background and removing page margins. The face is centered using SVG coordinates, and the mouth is positioned through a `g` transform translation, demonstrating basic SVG shape construction and styling through D3 selection and attribute methods.

AI-generated description
MIT Licensed

Similar vizzes