Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
Mmgermaine93
Last edited Aug 28, 2020
Created on Aug 28, 2020
Forked from React Starter

This example demonstrates basic SVG shapes—circles, rectangles, lines, and paths—styled with CSS to show how to create static vector graphics. It uses raw SVG elements within an HTML document, with the `g` element grouping shapes for combined transforms and the `lines` class applying stroke properties. A `transform="scale(1.5)"` enlarges the entire drawing, while individual fill colors and stroke widths are set directly on elements. The code relies solely on native SVG and CSS, with no external libraries, and renders shapes from hardcoded coordinate data in the markup.

AI-generated description
MIT Licensed

Similar vizzes