Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes with SVG and CSS

Public visualization

Shapes with SVG and CSS

0 stars1🌍 Public
MMei
Last edited Dec 27, 2020
Created on Dec 27, 2020

This example demonstrates a collection of basic SVG shapes—circles, rectangles, lines, and a path—arranged in a 960×500 canvas and scaled uniformly. It shows how attributes like `fill`, `stroke`, and `stroke-width` can be applied directly or inherited through an enclosing `<g>` group, while CSS classes (`.lines`, `.lines path`) override stroke properties with RoyalBlue and a rounded line join. The code uses raw SVG elements and a linked stylesheet (styles.css), with transforms such as `scale()` and `translate()` to position and resize the shapes.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed