Skip to main content
100%

Fork of Shapes and Colors with SVG and CSS

✓ Published1🌍 Public
Mmedhedijebara
Last edited May 5, 2021
Created on May 4, 2021

This example draws a stylized face using SVG shapes in a 960x500 viewport. A yellow circle forms the head, with two smaller dark circles for eyes and an arc-based path creating a mouth, all positioned via absolute coordinates and a translated group. The code uses D3 v6 selection methods (`select`, `append`, `attr`) and the `d3.arc` generator to construct the mouth path with inner and outer radii and specified start/end angles. CSS rules define stroke styles for path elements, though the classes are not applied in the visible script. The rendering is entirely SVG, with D3 handling DOM manipulation.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes