Let's make a face with CSS and D3
✓ Published1🌍 Public
This example uses D3 v5 to draw a smiling face with SVG primitives: a yellow circle for the head, smaller circles for eyes, rectangles for eyebrows, and an arc path for the mouth. The code animates the eyebrows by using D3's `transition()` method to move the group element vertically over two seconds, then back. All shapes are positioned relative to the SVG's center using a translated group, and the mouth is created with D3's `arc()` function from the `d3` import.
AI-generated descriptionAn example including some commonly used features of SVG.
MIT Licensed