Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published0🌍 Public
DDanteStack
Last edited Sep 27, 2019
Created on Sep 26, 2019

This example demonstrates basic SVG shapes—circles, rectangles, lines, and a path—styled with CSS and inline attributes. It shows how presentation properties like fill, stroke, stroke-width, and geometric transforms (`scale`, `translate`) can be applied at the element or group level, including inherited styles through `<g>` containers. The code uses native SVG markup inside a 960x500 canvas, with a separate stylesheet (styles.css) controlling the body layout and class-specific styling for the polyline group. The shapes are static with no data binding or interaction.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes