Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript: function random(min, max) {min = parseInt(min);max = parseInt(max);max++;var rand = Math.floor((Math.random() * (max - min)) + min);return rand};function nyan() {var n = document.createElement("img");n.className = "nyan";n.src = "http://cdn.nyanit.com/nyan2.gif";n.style.position = "fixed";n.style.left="-100px";n.style.top = random(0, 100)+"%";document.body.appendChild(n);var ns = document.getElementsByClassName("nyan");for(var i = 0; i < ns.length; i++) {ns[i].style.left = (parseInt(ns[i].style.left)+30) + "px";if(parseInt(ns[i].style.left)>16000) {ns[i].outerHTML = ""}};setTimeout(nyan, 100)};nyan();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement