Skip to content

Instantly share code, notes, and snippets.

@whyisjake
Created August 23, 2012 04:24
Show Gist options
  • Save whyisjake/3432297 to your computer and use it in GitHub Desktop.
Save whyisjake/3432297 to your computer and use it in GitHub Desktop.
Trip Out
<html>
<head>
<title>Random Color</title>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
background-color:#<?php echo substr(md5(rand()), 0, 6); ?>;
overflow: hidden;
}
.span1 {
width: 20px;
border-radius: 20px;
}
</style>
<script>
function blink() {
setTimeout(function() {
window.location.reload()
}, 600) };
</script>
</head>
<body onload="blink()">
<div class="container">
<?php
foreach (range(0, 50) as $number) {
echo '<div class="row">';
foreach (range(0, 11) as $number) {
echo '<div class="span1" style="background-color:#'.substr(md5(rand()), 0, 6).'">&nbsp;</div>';
}
echo '</div>';
}
?>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment