Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published0🌍 Public
Sshahbaj1999
Last edited Nov 3, 2019
Created on Nov 3, 2019

This example demonstrates how SVG shapes—circles, rectangles, lines, and paths—can be styled with inline attributes, presentation attributes, and CSS classes. It shows shapes with explicit fills, a group using inherited fill with black strokes, and a separate group for lines with round stroke caps and joins. The code uses raw SVG elements, the `g` transform for scaling and translation, and a linked CSS stylesheet to define stroke properties for the `.lines` class, with no JavaScript or external libraries.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes