Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Mmikeferri
Last edited Dec 31, 2021
Created on Dec 31, 2021
Forked from HTML Cars Report

This example demonstrates how to create basic geometric shapes, including circles, rectangles, lines, and paths, using SVG elements styled with CSS. The visualization employs a scale transform to enlarge the entire composition and a translate transform to reposition a group of shapes, while inline `fill` and `stroke` attributes apply colors and outlines. A CSS class named `.lines` defines stroke properties for the line and path elements, with the path using a teal stroke and rounded line joins. The page structure relies on standard HTML and CSS, with the SVG embedded directly in the markup.

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