Skip to main content
100%

SVGs and CSS

✓ Published1🌍 Public
Qquiqdome
Last edited Feb 24, 2021
Created on Feb 23, 2021
Forked from HTML Starter

This example shows a yellow smiley face constructed from basic SVG shapes, including a circular head, two eyes, and an arc-shaped mouth. It demonstrates the fundamental approach of using d3-selection from d3 v6 to append and style SVG elements with attributes. The code specifically uses `d3.select`, `.append`, and `.attr` to position shapes relative to the SVG's width and height, while the `arc` generator creates the mouth path. The rendering occurs in a React-free HTML page with CSS styling applied directly through SVG attributes like `fill` and `stroke`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes