Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published2🌍 Public
KKateryna
Last edited Sep 18, 2020
Created on Sep 18, 2020

This example shows a simple yellow face built from SVG shapes, including a circular head, eyes, eyebrows, and a mouth formed by a curved path. The SVG elements are positioned and styled using D3 v6 methods such as `select`, `append`, and `attr`. A CSS transition animates the eyebrows upward and back downward over two seconds, while the mouth is drawn using the `d3.arc` generator with specified angles. The data is generated procedurally within the code rather than loaded from an external source, and the animation relies on D3’s built-in `transition` method.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes