Skip to main content
100%

Shapes with SVG and CSS

✓ Published3🌍 Public
DDemi Johnson
Last edited Sep 21, 2020
Created on Sep 19, 2020
Forked from React Starter

This example demonstrates how SVG shapes—circles, rectangles, lines, and a path—can be styled using both inline attributes and CSS. It shows the interplay between explicit presentation attributes like `fill` and `stroke`, and stylesheet rules targeting classes such as `.lines` and `.lines path`. The rendering uses raw SVG elements within an HTML document, applying a `scale` transform and grouped translations to position the geometry. CSS handles stroke color, width, and line joins for the path, while inline attributes set fills on individual shapes.

AI-generated description
MIT Licensed

Similar vizzes