Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published3🌍 Public
MMichael Todd
Last edited May 18, 2020
Created on May 18, 2020

This example demonstrates how SVG shapes, including circles, rectangles, lines, and paths, can be styled with inline attributes and CSS classes. It shows the same shapes rendered in default black, with explicit fill colors, and with a group-level fill and stroke applied via a transform. The code uses SVG elements directly within an HTML document, relying on CSS selectors like `.lines` and `.lines path` to set stroke properties. A scale transform enlarges the entire scene for display.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes