Shapes with SVG and CSS
✓ Published0🌍 Public
This example demonstrates the fundamental SVG shapes—circle, rectangle, line, and path—as rendered through a combination of inline SVG markup and CSS styling. The code showcases how to apply fills, strokes, and stroke widths directly on elements, as well as how to group shapes for shared visual attributes using the `transform` and `g` elements. The CSS stylesheet defines classes (`.lines`) to control stroke properties and `stroke-linejoin`, while also setting a global body margin. The page uses a 960x500 SVG canvas with a scale transformation to enlarge the displayed shapes.
AI-generated descriptionAn example showing the capabilities of VizHub.
MIT Licensed