Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
RRubens
Last edited Sep 1, 2018
Created on Aug 27, 2018

A set of basic SVG shapes—circles, rectangles, lines, and a polyline path—is drawn on a 960×500 canvas, with styling applied through both inline attributes and an external CSS stylesheet. The examples demonstrate how presentation properties like fill and stroke can be set directly on SVG elements, inherited from a parent `<g>` group, or overridden via CSS classes such as `.lines`. The code uses raw SVG markup and CSS, with no JavaScript libraries, and includes a horizontal scale transform to stretch the shapes.

AI-generated description
MIT Licensed

Similar vizzes