Skip to main content
100%

Shapes with SVG and CSS

✓ Published3🌍 Public
PPourmahmood
Last edited Oct 23, 2020
Created on Oct 23, 2020
Forked from Hello VizHub

This example demonstrates how SVG shape elements are styled using both presentation attributes and CSS. It shows circles, rectangles, lines, and a path, with solid colors, strokes, and transforms applied. The code uses vanilla SVG markup with CSS rules from an external stylesheet, including a `.lines` class to set stroke properties. A `<g>` element applies `fill`, `stroke`, and `stroke-width` as inherited attributes, while another group uses a `translate` transform. The example highlights how CSS and SVG attributes interact to control visual appearance.

AI-generated description
MIT Licensed

Similar vizzes