jQuery 动画效果

基本概念

jQuery.fx.speeds["medium-fast"]=300;设置自定义时长

jQuery.fx.off 设置动画的开关

jQuery动画是异步的

jQuery动画默认是队列化的

动画方法中的回调函数中this指向当前执行动画的对象

自定义添加缓动函数 jQuery.easing()

动画方法

fadeIn() : Display the matched elements by fading them to opaque.

fadeOut() : Hide the matched elements by fading them to transparent.

fateTo() : Adjust the opacity of the matched elements.

hide() 和fadeOut()区别于将元素从布局中移除

show() 

hide() 

toggle() : Display or hide the matched elements.

slideDown()   和slideUp相反 The .slideDown() method animates the height of the matched elements.

slideUp()  高度动态变化到0

slideToggle() 

animate() : Perform a custom animation of a set of CSS properties.

stop()停止选中元素的动画  

delay()直接添加一个时间延迟到动画队列中 

 每一个元素的队列都与其他元素相独立

队列方法 queue() 给队列添加一个新的函数,类似于动画方法的回调函数  

dequeue()  Execute the next function on the queue for the matched elements 

clearQueue()  Remove from the queue all items that have not yet been run  

还可以通过jQuery来直接调用queue()和deQueue()方法,jQuery.queue(o,f)  给对象o的队列添加一个f回调函数工具函数

原文地址:https://www.cnblogs.com/goOtter/p/9534137.html