Created
January 11, 2015 18:42
-
-
Save jakedahn/3f8a2842b0e08f0b6534 to your computer and use it in GitHub Desktop.
Full demo with mask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
now = 0; | |
setInterval(function(){ | |
now = now + 30 | |
$("img.spin").animate({ | |
transform: 'rotate('+now+'deg)', | |
}, 1000, function(){ | |
//complete | |
}); | |
}, 3000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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