A Pen by Nathan Hakak on CodePen.
Created
April 28, 2014 00:34
-
-
Save natehak/11358987 to your computer and use it in GitHub Desktop.
A Pen by Nathan Hakak.
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
<br><br><br> | |
<div id="bigtext"> | |
WARNING, THIS FEATURES FLASHING LIGHTS AND STROBE EFFECTS. YOU HAVE BEEN WARNED. | |
</div> |
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
i = 0; | |
stepSize = 1; | |
stepStepSize = 1; | |
iSize = 10; | |
bigText = document.getElementById("bigtext"); | |
colorIndex = 0; | |
colors = ["aqua", "black", "blue", "fuchsia", "gray", "green", "lime", "maroon", "navy", "olive", "orange", "purple", "red", "silver", "teal", "white", "yellow"] | |
function increaseNumber() { | |
bigText.innerHTML = i.toString(); | |
bigText.style.fontSize = iSize.toString() + "pt"; | |
bigText.style.color = colors[colorIndex]; | |
document.body.style.backgroundColor = colors[colorIndex + 1]; | |
colorIndex++; | |
if (colorIndex == colors.length) { | |
colorIndex = 0; | |
} | |
i += stepSize; | |
stepSize += stepStepSize; | |
iSize++; | |
} | |
function run() { | |
setInterval(increaseNumber, 10); | |
} | |
setTimeout(run, 5000); |
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
@import url(https://fonts.googleapis.com/css?family=Open+Sans:800); | |
#bigtext { | |
text-align: center; | |
font-family: "Open Sans", "sans-serif"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment