Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes and Colors with SVG and CSS

Public visualization

Shapes and Colors with SVG and CSS

0 stars1🌍 Public
DDy-Diana
Last edited Nov 7, 2020
Created on Nov 7, 2020

This example demonstrates how to create and style basic SVG shapes—circles, rectangles, lines, and paths—using both inline attributes and CSS classes. A root `<g>` element applies a global scale transform, while nested groups use translate to position shape clusters, with one group inheriting fill and stroke styles and another defining thick, rounded line styles via the `.lines` class. The SVG is rendered directly in HTML with a 960×500 viewport, and CSS controls body margins and line appearance.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed