Skip to main content
100%

SVG with CSS

✓ Published0🌍 Public
Uusamakhanswati
Last edited Sep 18, 2023
Created on Sep 18, 2023
Forked from HTML Starter

This example shows how CSS can style SVG shapes, with a mix of default black fills and custom colors applied directly or via classes. It renders circles, rectangles, a line, and a path inside a scaled and translated group. The code uses raw SVG elements in an HTML page, with linked CSS rules that set stroke width, color, and line joins for the `.lines` class. Specific shapes are colored individually using `fill` attributes, while group-level styles inherit to child elements.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes