Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
EEdwin Cini
Last edited Mar 7, 2021
Created on Mar 7, 2021
Forked from HTML Starter

This example shows how SVG shapes—circles, rectangles, lines, and paths—can be directly styled and grouped using inline attributes and CSS classes. The code uses raw SVG elements within an HTML page, applying fill colors, strokes, and transforms like `scale` and `translate` via React’s rendering capabilities. CSS rules in `styles.css` control stroke width, color, and line joins for grouped elements, demonstrating how presentation can be separated from structure. The visualization relies purely on static markup, with no JavaScript or data-driven logic beyond the SVG’s native coordinate system.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes