扫码关注官方订阅号
点击下落
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
var movedCount=0,listLength=lists.length; function UDFloat(){ //判断完成的数量,如果已经完成,重置于movedCount为0 if(movedCount!==0&&movedCount!==listLength){ return; } if(movedCount===listLength){ movedCount=0; } if (updown) { n = 0; updown = false; } else{ n = 2; updown = true; } var arr = [50,400,50,50]; var num = 0; timerT= null; clearInterval(this.animate); timerT = setInterval(function(){ doMove(lists[num],arr[n],'top',arr[n+1],function(){ //move完成后,记录完成的数量 movedCount++; }); num++; if(num==lists.length){ clearInterval(timerT); } },80) }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...