Does anyone know of a good tutorial to achieve this? (as seen here: http://www.contrastrebellion.com/) I've looked at the code used on that site and finding it awkward to pull out what I need.
Much appreciated, Thanks
Edit: Also seen here: http://playgroundinc.com/
What I want to achieve:
To rotate a png as I scroll down and the speed of rotation to match the speed of scrolling.
This should get you going in the right direction : http://www.ianlunn.co.uk/blog/code-tutorials/recreate-nikebetterworld-parallax/ .
Here you go :
For animating the rotation on scroll .
http://jsfiddle.net/EnSkJ/2/
Code :
var sdegree = 0;
$(window).scroll(function() {
sdegree ++ ;
sdegree = sdegree + 3 ;
var srotate = "rotate(" + sdegree + "deg)";
$("img").css({"-moz-transform" : srotate, "-webkit-transform" : srotate});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With