Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes and Colors with SVG and CSS

Public visualization

Viewing a saved revision (read-only)

4d04ef20d6c5475ebca52403bf3e2913

Shapes and Colors with SVG and CSS

0 stars0🌍 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