Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
Rrvdv
Last edited Dec 1, 2021
Created on Dec 1, 2021
Forked from HTML Starter

This example demonstrates how basic SVG shapes—circles, lines, and a path—can be styled with CSS within a React-based HTML page. It shows the rendering of three filled circles, a group of unfilled strokes, and a polygonal path, using attributes like `fill`, `stroke`, and `stroke-width`. The code relies on vanilla SVG elements and CSS class selectors (`.lines`, `.lines path`) to apply visual properties, without any JavaScript libraries. The layout uses SVG `transform` scales and translations to position the shapes, illustrating a static, style-driven approach to vector graphics.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes