Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Bbhayyasaheb
Last edited May 10, 2020
Created on May 10, 2020
Forked from HTML Starter

This example demonstrates how to create basic geometric shapes—circles, rectangles, lines, and paths—using SVG elements styled with CSS. It shows how SVG presentation attributes like `fill` and `stroke` can be applied directly to elements or inherited from parent `<g>` groups. The code uses the React framework but primarily relies on raw SVG markup within an HTML file. A CSS class named `.lines` applies stroke properties to line and path elements, with path-specific styling for `stroke-linejoin`. The example illustrates layering, grouping via transforms, and styling inheritance.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes