Skip to main content
100%

SVG Sol LeWitt

✓ Published1🌍 Public
Mmax-31
Last edited Aug 24, 2022
Created on Aug 24, 2022
Forked from JS basics

This example renders a grid of thin vertical rectangles across the full viewport using raw SVG elements. It creates 48 rectangles via `document.createElementNS` for the SVG namespace, positioning each at 20-pixel intervals with a fixed width of 10. The rectangles span the entire window height, producing a minimalist, repetitive pattern reminiscent of Sol LeWitt’s wall drawings. The code sets the SVG’s dimensions to `window.innerWidth` and `window.innerHeight`, and dynamically appends the SVG to the document body. No external libraries are used; only native JavaScript and SVG APIs.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes