jquery animate动画持续运动

时间:2022-05-10
本文章向大家介绍jquery animate动画持续运动,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
function fingers(){
     $(".box01 .fingers").animate({"width":"7.5rem","marginLeft":"-3.75rem"},500,function(){
       $(".box01 .fingers").animate({"width":"6.8rem","marginLeft":"-3.4rem"},500,fingers());
     });
   }
fingers();

如上,想要实现左右持续运动,则把该动画封装为一个函数,再反复调用就好。