Skip to main content
100%

Shapes with SVG and CSS

✓ Published0🌍 Public
Ssilenusrich
Last edited Jul 17, 2019
Created on Jul 8, 2019
Forked from Hello VizHub

This example demonstrates basic SVG shape rendering with inline presentation attributes and CSS styling. It shows circles, rectangles, a line, and a path, with inherited visual properties applied to grouped elements. The code uses raw SVG elements within an HTML document, applying a scale transform to the entire canvas and a translate transform to a subgroup. CSS classes control stroke and line-join for the path, while group-level presentation attributes set fill and stroke for child shapes. The example highlights how SVG presentation attributes can be overridden by CSS rules, enabling flexible styling control.

AI-generated description
MIT Licensed

Similar vizzes