网络编程
位置:首页>> 网络编程>> JavaScript>> js特效,页面下雪的小例子

js特效,页面下雪的小例子

  发布时间:2024-04-22 22:32:21 

标签:js,特效,下雪

if (arr[i]){
                var ofs=$(this).offset();
                var x=parseInt(ofs.left);
                var y =parseInt(ofs.top);
                var vy=parseInt($(this).attr("vy"));
                x +=wind;
                vy *= ay;
                y+= vy;
                $(this).offset({"top":y});
                $(this).offset({"left":x});
                if(y>winHeight){
                    $(this).remove();
                    delete arr[i];
                }


这就是它的核心代码,没有什么神秘的.我也就不多做解释了.BYE.

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com