Skip to main content
100%

horizontal lines

✓ Published1🌍 Public
AAkshay
Last edited Nov 17, 2022
Created on Nov 17, 2022
Forked from lines

This example displays a full-screen SVG filled with 100 evenly spaced horizontal gray lines. Each line is a separate `<rect>` element, generated programmatically in a loop, with a width matching the viewport and a height of 10 pixels. The rectangles are spaced 20 pixels apart vertically, using a plain JavaScript approach with `document.createElementNS` and `setAttribute`. The visualization demonstrates a simple, static grid pattern that adapts to the browser window’s width and height. No external libraries or frameworks are used; it relies solely on native DOM 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