$(window).scroll(function () { $("#car") .animate({rotate:-12},{duration:0.1}) .animate({"top":"+=8px"},0.200) .animate({rotate:-20},{duration:0.100}) .animate({"top":"+=5px"},2) .animate({rotate:-24},{duration:1}) .animate({"top":"+=3px","left":"-=3px"},2) .animate({rotate:-28},{duration:1}) .animate({"top":"+=5px","left":"-=2px"},2) .animate({rotate:-34},{duration:1}) .animate({"top":"+=3.7px","left":"-=2.5px"},2) .animate({rotate:-41},{duration:100}) .animate({ "top":"+=170px","left":"+=180px" }, 4000) .animate({rotate:-44},{duration:100}) .animate({ "top":"+=112px","left":"+=128px" }, 4000) .animate({ "top":"+=11px","left":"+=10px" }, 1000) .animate({rotate:-40},{duration:100}) .animate({ "top":"+=3px","left":"+=4px" }, 100) .animate({rotate:-36},{duration:100}) .animate({ "top":"+=3px","left":"+=4px" }, 100) .animate({rotate:-28},{duration:100}) .animate({ "top":"+=3px","left":"+=4px" }, 100) .animate({rotate:-20},{duration:100}) .animate({ "top":"+=3px","left":"+=4px" }, 100) .animate({ "top":"+=0px","left":"+=3px" }, 100) .animate({ "top":"+=1px","left":"+=3px" }, 100) .animate({ "top":"+=1px","left":"+=2px" }, 100) .animate({rotate:10},{duration:100}) .animate({ "top":"+=2px","left":"+=3px" }, 100) .animate({rotate:30},{duration:100}) .animate({ "top":"+=0px","left":"+=10px" }, 100) .animate({rotate:50},{duration:100}) .animate({ "top":"+=90px","left":"-=120px" }, 1000) }); (function($){ var _e = document.createElement("canvas").width $.fn.cssrotate = function(d) { return this.css({ '-moz-transform':'rotate('+d+'deg)', '-webkit-transform':'rotate('+d+'deg)', '-o-transform':'rotate('+d+'deg)', '-ms-transform':'rotate('+d+'deg)' }).prop("rotate", _e ? d : null) }; var $_fx_step_default = $.fx.step._default; $.fx.step._default = function (fx) { if(fx.prop != "rotate")return $_fx_step_default(fx); if(typeof fx.elem.rotate == "undefined")fx.start = fx.elem.rotate = 0; $(fx.elem).cssrotate(fx.now) }; })(jQuery);
<body onload="init();"> <script type="text/javascript" src="http://jqueryrotate.googlecode.com/svn/trunk/jQueryRotate.js"></script> <div id="cloud-01"><img src="http://i1081.photobucket.com/albums/j343/niteshkhanna89/surface.jpg"> <div id="car"><img src="http://i1081.photobucket.com/albums/j343/niteshkhanna89/car5.jpg">
#car{ width: 0%; height: 0px; top: 50px; left: 55px; position: absolute; }