Skip to main content
100%

Shapes and Colors with SVG CSS

✓ Published0🌍 Public
LLHFO94
Last edited Mar 11, 2020
Created on Mar 11, 2020

This example demonstrates how to create a simple face using SVG shapes styled with CSS. It shows a yellow circle with two black eyes and a curved mouth, all composed of basic SVG elements. The code uses D3 v5’s `select`, `arc`, and attribute methods to append and position the circles and path. The face is centered within an SVG canvas, with the mouth drawn using an arc generator specifying inner and outer radii and start and end angles. The styles.css file removes page margins and hides overflow.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes