Shapes with SVG and CSS
✓ Published1🌍 Public
This example demonstrates how SVG shapes can be styled and grouped using CSS and SVG transform attributes. It shows circles and rectangles rendered with default black fills, then with explicit green and blue fills, and finally inside a group that applies red fill with a black stroke via CSS properties. A line and a path illustrate stroke styling, where the path inherits a purple stroke and round line joins from a CSS class. The SVG is rendered inside a React-based HTML page, with the root group scaled by 1.1 and the lower group translated vertically.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed