你的位置:首页 > 软件开发 > Java > jQuery animate动画 stop()方法详解~

jQuery animate动画 stop()方法详解~

发布时间:2016-10-11 12:00:09
一、动画格式:  格式一:jQueryObject.animate( cssProperties, options )  格式二:$(#id).animate( styles[, duration ] [, easing ] [, complete ] )  手动调用方法:$ ...

一、动画格式:

  格式一:jQueryObject.animate( cssProperties, options )

  格式二:$('#id').animate( styles[, duration ] [, easing ] [, complete ] )

  手动调用方法:$('#id').dqueue( [ queueName ] )

  停止方法:$('#id').stop( [ queueName ] [, clearQueue [, jumpToEnd ]  )

二、属性介绍:

2-1、animate属性:部分资料来源:更多>>

  styles: 执行的css动画集合:一个或多个css属性的键值对所构成的Object对象。

  speed/option: 执行时间/可以设置相关属性(指定动画运行多长时间(毫秒数),默认值为400。该参数也可以为字符串"fast"(=200)或"slow"(=600));

  easing:指定使用何种动画效果,默认为"swing",还可以设为 "linear"或其他自定义的动画样式函数

  callback:回调函数

2-2、stop属性:

  queueName:(默认:'fx')需要停止动画的队列名称;

  clearQueue:(默认:false)是否执行清除后续队列:$(selector).animate(a,b,c)..animate(a2,b2,c2).animate(a3,b3,c3)...N;

  jumpToEnd:(默认:false)是否停止当前执行的动画同时直接跳到动画的效果最终结果;

 

示例:

1、自动执行

$(selector).animate(a,b,c)..animate(a2,b2,c2).animate(a3,b3,c3)...N;

stop()方法使用实例:

$('#btnstop').click( function(){

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:jQuery animate动画 stop()方法详解~

关键词:jquery

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录