Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
JJuyeonee
Last edited Aug 9, 2021
Created on Aug 9, 2021
Forked from HTML Cars Report

This example demonstrates how SVG shapes—circles, rectangles, lines, and paths—are drawn and styled using both inline attributes and external CSS. The SVG canvas is scaled and transformed, with some shapes inheriting default black fills while others use explicit `fill` colors or are grouped inside a `<g>` element that applies shared fill and stroke properties. A CSS class named `.lines` sets stroke color and width for the line and path elements, while the path also gets a custom stroke color and rounded line joins. The code uses raw SVG markup and CSS selectors, with no external libraries.

AI-generated description

A demonstration of basic HTML and CSS.

MIT Licensed

Similar vizzes