Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes and Colors with SVG and CSS

Public visualization

Viewing a saved revision (read-only)

93a0f98ab26b4fe6b4d166c363f8a25b

Shapes and Colors with SVG and CSS

0 stars0🌍 Public
TTheRoadSign
Last edited Jan 9, 2020
Created on Jan 9, 2020

This example demonstrates how to draw basic shapes—circles, rectangles, lines, and paths—in a 960-by-500 SVG canvas, using both presentation attributes and CSS classes to control fill color, stroke, stroke width, and line joins. The code applies scaling and translation transforms to group and reposition the shapes, while the stylesheet sets margins and defines the `.lines` class with distinct stroke properties for the line and path elements. It is a straightforward illustration of vector graphics rendering with raw SVG and CSS, without any JavaScript libraries.

AI-generated description

An example including some commonly used features of SVG.