Skip to main content
100%

Shapes with SVG AND CSS

✓ Published0🌍 Public
MMusikdude
Last edited Feb 13, 2020
Created on Feb 13, 2020
Forked from Hello Boss

This example demonstrates how basic SVG shapes—circles and rectangles—can be styled and grouped using both inline attributes and CSS. It shows three sets of shapes: the first uses default black fill, the second uses explicit inline fill colors, and the third applies a `fill` attribute to a `<g>` group to style all contained shapes. The code also defines a `.highlighted` CSS class, though it is not applied to any visible element. The SVG is rendered directly in the HTML document with a fixed 960×500 viewport, using standard SVG elements and a linked external stylesheet.

AI-generated description
MIT Licensed

Similar vizzes