Skip to main content
Public

Share visualization

Loading preview…

Shapes with SVG and CSS

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Shapes with SVG and CSS

1
Hhamza.miftah@gmail.com
Last edited Jul 8, 2022
Created on Jul 8, 2022
Forked from HTML Cars Report

This example demonstrates the fundamental SVG shapes—circles and rectangles—styling through both inline attributes and CSS classes. It shows how presentation properties like fill, stroke, and stroke-width can be defined either directly or via a stylesheet. The code applies a scale transform to the entire group, then a translate with a grouped color and stroke style, and finally a path with a round stroke-linejoin. The `.lines` class in `styles.css` sets stroke appearance, while `index.html` uses standard SVG markup within an HTML document.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed