Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published1🌍 Public
Hhirokat
Last edited Jan 23, 2020
Created on Jan 23, 2020

This example shows how to create basic geometric shapes and apply colors and styles using SVG and CSS. It draws circles and rectangles with default black fills, explicit fills set via the fill attribute, and a group with a shared fill and stroke applied through presentation attributes. A separate group uses the CSS class .lines to define stroke properties for a line and a polygonal path. The SVG is rendered inline in an HTML file, with all styling done in a linked stylesheet.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes