Skip to main content
100%

Fork of learn svg through 24 examples

✓ Published0🌍 Public
Mme-as-a-web-designer
Last edited Dec 14, 2021
Created on Dec 14, 2021

This visualization showcases a progression of SVG techniques through 24 examples, beginning with basic shapes and advancing to clipping paths and rotation transforms. It demonstrates how to define reusable elements in `<defs>` and apply them with `<use>` tags, creating complex compositions like a snowflake with six rotated branches. The examples use native SVG APIs including `clipPath`, `clip-path`, and `transform` attributes to build geometric patterns with polygons, polylines, and paths. Each mini-example highlights a specific SVG feature, from coordinate systems with zero-centered viewBoxes to decorative elements like baubles, trees, and geometric abstract shapes.

AI-generated description

Bauble

Added a rectangle with fill none to show off the boundary Helpful to have (0, 0) as centre of image

Tree

Had to increase the viewBox height to include the supplied coordinates

Bauble with decoration

This looks easy. Define a circle as the clipPath in <defs> then use clip-path in the polyline

snowflake

define one arm of the snowflake in defs then use that definition with rotation every 60 degrees

MIT Licensed

Similar vizzes