Skip to main content
100%

Fork of Fork of SVG Fundamentals

✓ Published1🌍 Public
SSimon Krukowski
Last edited May 8, 2024
Created on May 8, 2024

This example reproduces a Sol LeWitt–style drawing by generating vertical black bars across the full browser viewport. The code creates an SVG element sized to the window’s inner dimensions and appends a series of `<rect>` elements spaced 20 pixels apart, each 10 pixels wide and as tall as the window. It uses the JavaScript DOM API (`createElementNS`, `setAttribute`, `appendChild`) to build the SVG programmatically. The resulting composition is a minimalist grid of alternating stripes, driven entirely by the current window size.

AI-generated description

A demonstration of SVG shapes.

MIT Licensed

Similar vizzes