Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
Nncube-eng
Last edited Jul 26, 2020
Created on Jul 26, 2020

This example demonstrates basic SVG shapes—circles, rectangles, and a line—styled with CSS and positioned directly in an HTML document. It shows how SVG elements can be given inline attributes like `fill`, `stroke`, `stroke-width`, and a `transform` group to control color, outlines, and placement. The code uses no JavaScript libraries, relying purely on native SVG markup and a small external stylesheet that resets the page margins. A red-highlighted class in the CSS hints at potential text styling, though no text elements appear in the rendered graphic.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes