Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Ppml31780
Last edited Nov 10, 2022
Created on Nov 4, 2022

This example shows how to draw and style basic SVG shapes—including circles, rectangles, lines, and a path—on a 960×500 canvas. The shapes are grouped and transformed using SVG’s `scale` and `translate` attributes to position and size them. CSS in an external stylesheet (styles.css) defines stroke and fill properties for the groups, including a `.lines` class that sets black strokes and a class-specific path style with a dark teal color and rounded line joins. The page uses plain HTML with linked CSS, no JavaScript frameworks or libraries.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes