Skip to main content
100%

ID and Class

✓ Published0🌍 Public
CCurran Kelleher
Last edited Mar 13, 2021
Created on Mar 13, 2021
Forked from SVG Fundamentals

This example demonstrates the difference between SVG ID selectors and class-based styling. A closed polygon with `id="inner-path"` uses the `#inner-path` CSS rule for its black fill, while six open polyline paths rely on the generic `path` selector for their black strokes and no fill. The shape forms a fan of radiating lines converging toward the left edge, rendered in an SVG canvas with a 960×500 viewport. The code uses raw SVG elements and CSS, with no JavaScript libraries or data sources involved.

AI-generated description

A demonstration of SVG shapes.

MIT Licensed

Similar vizzes