Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
Llkahlon9
Last edited Jan 14, 2021
Created on Jan 14, 2021
Forked from Hello VizHub

This example shows how to build a simple emoji-like face using SVG shapes and CSS. It displays a yellow circle with two black eye circles and a curved mouth path, all positioned within an SVG canvas. The code demonstrates basic D3.js selection and append methods, using `d3.select`, `d3.arc`, and attribute chaining to create and style the shapes. The mouth is generated with the D3 arc generator, which computes a path based on specified inner and outer radii and angle values. A single CSS file handles page margins and overflow settings.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes