Skip to content

Instantly share code, notes, and snippets.

@altitude
Created July 3, 2013 20:18
Show Gist options
  • Save altitude/5922429 to your computer and use it in GitHub Desktop.
Save altitude/5922429 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta charset="utf-8">
<title>Stripe</title>
<style type="text/css">
html, body{
width: 100%;
height: 100%;
margin:0;
padding: 0;
}
body{
background: #eee;
color: #333;
}
.bubble{
width:10em;
height: 10em;
/*border-radius: 100%;*/
text-align: center;
line-height: 10em;
color: whitesmoke;
cursor: pointer;
float: left;
}
.bubble:hover{
}
.bubble p{
font-size: 200%;
padding-top: 1em;
}
</style>
<script type="text/javascript" src="jquery203.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var numtiles = 100;
var numlines = 3;
var tile = $("body").html();
for(var i=0; i < numtiles*numlines-1; i++)
$("body").append(tile);
$(".bubble").css("width",window.innerWidth/numtiles).css("height",window.innerWidth/numtiles);
for(var i=0; i < $(".bubble").length; i++)
$(".bubble").eq(i).css("background",'#'+Math.floor(Math.random()*16777215).toString(16));
})
</script>
</head>
<body>
<div class="bubble">
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment