Last active
June 21, 2019 16:30
-
-
Save SnO2WMaN/ef62b540967804d9fece722e27797633 to your computer and use it in GitHub Desktop.
旧来のツイッターで、誕生日風船がを大量に表示するやつ.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ブラウザで開発者ツール(F12)を開き、Consoleの部分に叩き突けてください。 | |
// 200を任意の数にして風船の数を制御 | |
for(let i = 0;i < 200;i++){ | |
const bln = document.createElement("span") | |
bln.className = `Balloon Balloon--${['small','medium','large'][Math.floor(Math.random() * 3)]} Balloon--${['red','blue','yellow','green','purple'][Math.floor(Math.random() * 5)]}` | |
bln.style=`left:${Math.random() * 100}vw;top:${Math.random() * 100}vh;` | |
document.body.appendChild(bln); | |
} |
Author
SnO2WMaN
commented
Jun 21, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment