title
A prototype
body{ display:flex; flex-direction:column; margin:0; background:black; } div{ height:10vh; }
let d = document let b = d.body let number = 10 let colors = ["cyan", "green", "purple", 'tomato', 'gold'] let lastColor for (var i = 0; i < number; i++) { let r1 = Math.floor(Math.random() * 3000) let r2 = Math.floor(Math.random() * 5) let r3 = Math.floor(Math.random() * colors.length) let r4 = Math.floor(Math.random() * 50) let r5 = Math.floor(Math.random() * 50) let item = d.createElement("div") item.style.width = r1 + "px" item.style.top = r4 + "vh" item.style.left = "0vw" item.style.background = colors[r3] lastColor = colors[r3] item.title = r1 b.appendChild(item) }
snap
save
new
fork
download
html
css
js
output
gallery
config
➚ link to output
➚ snap player
font size
live reload
snap mode
layout
⤷ switch
★ info and code