Skip to main content
Public

Share visualization

Loading preview…

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

Shapes and Colors with SVG and CSS

1
AAravind Subramaniam
Last edited Jan 17, 2020
Created on Jan 17, 2020

This example demonstrates a collection of basic SVG shapes—circles, rectangles, lines, and a polyline path—arranged in a grid and styled with both inline attributes and CSS classes. The SVG elements are grouped and transformed using the `transform` attribute for scaling and translation, while the CSS file defines stroke properties for the line elements. Rendered entirely with inline SVG markup, the visualization shows how fill colors can be applied directly or inherited from parent `<g>` groups, including combined fill and stroke effects.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed