Skip to content

Instantly share code, notes, and snippets.

@natehak
Created April 28, 2014 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natehak/11358987 to your computer and use it in GitHub Desktop.
Save natehak/11358987 to your computer and use it in GitHub Desktop.
A Pen by Nathan Hakak.
<br><br><br>
<div id="bigtext">
WARNING, THIS FEATURES FLASHING LIGHTS AND STROBE EFFECTS. YOU HAVE BEEN WARNED.
</div>
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);
@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