Skip to main content
100%

Shape with SVG and CSS

✓ Published1🌍 Public
CCassie-Xiao-Yu
Last edited May 21, 2020
Created on May 21, 2020

This example uses SVG shapes and CSS to draw a cheerful face with a yellow circle, black eyes, and eyebrows, all rendered statically in a React-like D3 v5 setup. A path, built with the `arc` generator, forms a half-circle mouth. The right eyebrow animates via chained `transition().duration(2000)` calls, moving it upward and back, while other elements remain fixed. The code demonstrates basic SVG attribute manipulation with D3 selections, including `attr` and `transition`, within an HTML page that loads d3.v5.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes