Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
RRajneesh Kumar
Last edited Aug 3, 2019
Created on Aug 2, 2019
Forked from Hello VizHub

This example demonstrates how basic geometric shapes—circles, rectangles, lines, and paths—can be styled and combined within an SVG scene using both inline attributes and external CSS. The code relies on raw SVG elements and CSS rules to control fill colors, strokes, stroke-widths, and line joins, with transform groups repositioning and scaling the shapes. A light-blue group applies a shared fill and black stroke, while a second group uses the `.lines` class to render dark teal strokes with rounded corners. The rendering is entirely SVG-based, with the page automatically scaling the entire graphic by a factor of 1.6.

AI-generated description
MIT Licensed

Similar vizzes