Skip to main content
100%

Fork of Shapes and Colors with SVG and CSS

✓ Published1🌍 Public
EEsteLima
Last edited Feb 23, 2021
Created on Feb 23, 2021

This example demonstrates a collection of basic SVG shapes—circles, rectangles, lines, and a path—styled with CSS and organized using SVG group elements with transforms for scaling and translation. The code uses SVG’s native `circle`, `rect`, `line`, and `path` elements, with fill and stroke properties set both inline and via a separate stylesheet. A `<g>` element with a class applies stroke styling to the line and path, while another group uses a `fill` attribute and `stroke` attribute to inherit styling across its child shapes. The rendering is entirely static, with no JavaScript libraries or data sources involved.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes