Fork of sole lowit reproduction
✓ Published2🌍 Public
This example demonstrates a straightforward technique for populating an SVG canvas with vertical rectangles. The code creates 100 `<rect>` elements, each with a fixed width of 10 pixels, and positions them horizontally by incrementing their x-coordinate by 20 pixels for every iteration. The rectangles span the full height of the viewport, creating a striped pattern. It uses JavaScript to programmatically construct the SVG via the `document.createElementNS` API, setting the `width` and `height` attributes dynamically based on the browser window's inner dimensions. The rendering uses only basic shapes without any external libraries.
AI-generated descriptionA demonstration of SVG shapes.
MIT Licensed