Skip to main content
100%

Shapes with svg and CSS

✓ Published0🌍 Public
Rrgarimella-viz
Last edited Jun 21, 2020
Created on Jun 21, 2020

This example demonstrates how to draw basic SVG shapes—circles, rectangles, lines, and paths—and style them using CSS classes. The shapes are nested inside a scaled and translated SVG group, showing how transforms affect their positions. The code uses raw SVG elements within an HTML page and applies styling through an external stylesheet, where the `.lines` class sets stroke color and width, and a descendant selector customizes the path's line join.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes