Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
Mmp7090
Last edited Feb 7, 2021
Created on Feb 7, 2021
Forked from HTML Starter

This example demonstrates how basic SVG shapes—circles, rectangles, lines, and paths—are styled using CSS, with explicit fills, strokes, and group transformations. The SVG markup defines a 960×500 canvas, scaled by 1.5, containing shapes with hardcoded coordinates. CSS rules in `styles.css` apply stroke styling to line elements via a `.lines` class and set a round stroke-linejoin on paths, while the body’s margin and overflow are reset. No JavaScript or data is involved; the rendering relies solely on SVG’s native presentation attributes and external stylesheets.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes