Skip to main content
Public

Share visualization

Loading preview…

Fork of Shapes and Colors 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

Fork of Shapes and Colors with SVG and CSS

0
Ccryiscott
Last edited Aug 11, 2022
Created on Aug 11, 2022

This example demonstrates how SVG shapes and CSS classes can be used together to create a simple, static composition. It shows circles, rectangles, lines, and a path, with some shapes filled using inline attributes and others styled via CSS. The SVG is rendered directly in HTML, using nested `<g>` elements for grouping and transformations, with a `scale` applied to the entire scene. CSS rules in `styles.css` define stroke widths and colors for the `.lines` group, while inline `fill` and `stroke` attributes handle individual shape styling. The rendering approach is pure SVG, with no external libraries or data sources involved.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed