Created
November 11, 2015 15:33
-
-
Save idcooldi/1d8fc4acd13f0a41bad5 to your computer and use it in GitHub Desktop.
Parallax Effect / по средствам анимации
This file contains 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
$(window).scroll(function() { | |
var st = $(this).scrollTop() /10; | |
$(".object").css({ | |
"transform" : "translate3d(0px, " + st + "%, 0px)", | |
"-webkit-transform" : "translate3d(0px, " + st + "%, 0px)" | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment