超简单的背景动画文件,代码就一句,JoynBackground(您需要的效果,速度);只需把图片放在下边的Div中,就可按照您向要的方式展示您的图片。效果包含拉近,拉远,切换……核心JS代码function JoynBackground($move,$sudu){ var $img_num=$('#JoynBackground').children('img').length; var $img_show=1; switch($move){ case 1: $("#JoynBackground img").css({width:"120%",height:"120%",top:"-10%",left:"-10%"}); $("#JoynBackground img[name='1']").css({display:"block"}) .animate({width:"100%",height:"100%",top:"0",left:"0"},$sudu-1000); setInterval(function(){ $("#JoynBackground img[name='"+$img_show+"']").fadeOut(100); $img_show++;$img_show=$img_show>$img_num?'1':$img_show; $("#JoynBackground img[name='"+$img_show+"']").css({width:"120%",height:"120%",top:"-10%",left:"-10%"}).fadeIn(1000) .animate({width:"100%",height:"100%",top:"0",left:"0"},$sudu-1000); },$sudu); break; case 2: $("#JoynBackground img[name='1']").css({display:"block"}) .animate({width:"120%",height:"120%",top:"-10%",left:"-10%"},$sudu-1000); setInterval(function(){ $("#JoynBackground img[name='"+$img_show+"']").fadeOut(100); $img_show++;$img_show=$img_show>$img_num?'1':$img_show; $("#JoynBackground img[name='"+$img_show+"']").css({width:"100%",height:"100%",top:"0%",left:"0%"}).fadeIn(1000) .animate({width:"120%",height:"120%",top:"-10%",left:"-10%"},$sudu-1000); },$sudu); break; case 3: $("#JoynBackground img[name='1']").css({display:"block"}); setInterval(function(){ $("#JoynBackground img[name='"+$img_show+"']").fadeOut($sudu); $img_show++;$img_show=$img_show>$img_num?'1':$img_show; $("#JoynBackground img[name='"+$img_show+"']").fadeIn($sudu); },$sudu); break; }}
文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)