Skip to content

Instantly share code, notes, and snippets.

@jakedahn
Created January 11, 2015 18:42
Show Gist options
  • Save jakedahn/3f8a2842b0e08f0b6534 to your computer and use it in GitHub Desktop.
Save jakedahn/3f8a2842b0e08f0b6534 to your computer and use it in GitHub Desktop.
Full demo with mask
<div class='container'>
<img class='spin' id="spin" src="http://publichosting.s3.amazonaws.com/wheel-with-mask/wheel.png">
<img class='mask' src="http://publichosting.s3.amazonaws.com/wheel-with-mask/mask.png" >
<h1>everyday</h1>
</div>
now = 0;
setInterval(function(){
now = now + 30
$("img.spin").animate({
transform: 'rotate('+now+'deg)',
}, 1000, function(){
//complete
});
}, 3000)
body {
background: #b877d1;
}
div.container {
margin-left: 100px;
margin-top: 50px;
}
h1 {
color: #fff;
font-family: ff-enzo-web;
font-size: 42px;
top: 55px;
left: 320px;
position: relative;
}
img.mask {
opacity: 0.75;
}
img {
position: absolute;
text-align: center;
vertical-align:center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment