✅ 操作成功!

stop用法

发布时间:2023-06-04 作者:admin 来源:文学

stop用法

stop用法

-休闲吧

2023年2月15日发(作者:借光读书的故事)

JQuery动画animate的stop⽅法使⽤详解

animate语法:

复制代码代码如下:

$(selector).animate(styles,speed,easing,callback)

复制代码代码如下:

Testing

.wrap{

position:relative;

height:300px;

width:300px;

border:5pxsolid#FCF;

}

.wrapdiv{

position:absolute;

left:0;top:0;

height:50px;

width:50px;

background:#FA0;

}

.stop();//停⽌当前动画,沿路返回起点,若是返回过程中再点击,会暂停在路中

.stop(true);//停⽌所有动画去的路程中点击停⽌会直接到达终点,若是返回过程中再点击,会暂停在路中

.stop(true,true);//停⽌所有动画,去的路程中点击停⽌会直接到达终点,若是返回过程中再点击,会停⽌到在起点

👁️ 阅读量:0