Created
September 16, 2012 03:50
-
-
Save bailon/3730937 to your computer and use it in GitHub Desktop.
Baconzine - background blinking like pokémon
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Baconzine</title> | |
<script> | |
(function () { | |
var _this = this; | |
var timer = setInterval(function () { changeBackground(); }, 100); | |
function changeBackground () { | |
var r = Math.floor(Math.random() * 255); | |
var g = Math.floor(Math.random() * 255); | |
var b = Math.floor(Math.random() * 255); | |
var bgColor = r + ',' + g + ',' + b; | |
var fgColor = (255 - r) + ',' + (255 - g) + ',' + (255 - b); | |
document.bgColor = bgColor; | |
document.fgColor = fgColor; | |
} | |
})() | |
</script> | |
</head> | |
<body style="font-size:100px; margin-top:100px; text-align:center"> | |
FNORD FNORD FNORD | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment