🌍 Public
Viewing a saved revision (read-only)
602463e1aa244238af6347f1a31b1a9c
Fork of Fork of SVG Fundamentals
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 descriptionA demonstration of SVG shapes.