Loading . . .
Loading . . .
Minecraft Style MOTD Banner in HTML5
Works in Chrome and Firefox!
<!-- HTML -->
<h1>
<div class="tilter">
<div id="motd" class="pop" >Loading . . . </div>
</div>
</h1>
<!-- JS -->
<script>
var motd = new Array();
function defineMOTD(){
motd[0] = "New!"
motd[1] = "Approved!"
motd[2] = "Certified Fresh!"
motd[3] = "Computers!"
motd[4] = "Accept no substitute!"
motd[5] = "The original!"
motd[6] = "So realistic!"
motd[7] = "Even better!"
motd[8] = "What?!"
motd[9] = "Computer say what?"
motd[10] = "Error!"
motd[11] = "Power On!"
motd[12] = "Off mode disengaged."
motd[13] = "Almost 90% accurate!"
motd[14] = "Press Start to Play"
motd[15] = "Insert Coin"
motd[16] = "Loading . . ."
motd[17] = "File not found."
motd[18] = "You've got Mail!"
motd[19] = "On Mode On!"
}
function getRandNum(y, z){
var r = Math.floor((Math.random() * y) + z);
return r;
}
function setMOTD(){
var rand = getRandNum((motd.length), 0);
var b=document.getElementById("motd")
b.innerHTML=motd[rand];
}
defineMOTD();
setMOTD();
</script>
<!-- CSS -->
<style>
#motd {
color: green;
font-size: 0.75em;
text-transform: uppercase;
}
.pop {
animation: pop 0.58s infinite;
-webkit-animation: pop 0.58s infinite;
}
@keyframes pop {
from {
transform:scale(0.95)
}
50% {
transform:scale(1)
}
to {
transform:scale(0.95)
}
}
@-webkit-keyframes pop {
from {
-webkit-transform:scale(0.875)
}
100% {
-webkit-transform:scale(1)
}
to {
-webkit-transform:scale(0.875)
}
}
.tilter {
-ms-transform: rotate(-20deg);
-webkit-transform: rotate(-20deg);
transform: rotate(-20deg);
}
</style>