title
A prototype
div{ width:10px; height:10px; background:red; margin:10px; border-radius:100%; }
let d = document let b = d.body let number = 100 let colors = ["gray", "black", "purple"] for (var i = 0; i < number; i++) { let r1 = Math.floor(Math.random() * 100) let r2 = Math.floor(Math.random() * 5) let r3 = Math.floor(Math.random() * colors.length) let item = d.createElement("div") item.style.width = r1 + "px" item.style.height = r1 / 5 + "px" item.style.border = r2 + "px solid "+ colors[r3 - 1] item.style.background = colors[r3] 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