Skip to content

jquery_ref_effects

jQuery 提供了一系列 methods 方法用于在 HTML 元素 elements 上创建视觉效果 visual effects 和动画 animations。注意 Note,对于 many common animations 许多常见动画,CSS 过渡 transitions 和动画 animations 可以提供 better performance 更好的性能 和 hardware acceleration 硬件加速。

方法描述
.hide()隐藏 Hides 选定的 selected 元素 elements。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.show()显示 Shows 选定的 selected 元素 elements。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.toggle()切换 Toggles 选定 selected 元素 elements 的可见性 visibility(显示 show/隐藏 hide)。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.fadeIn()使 Fades in 选定的 selected 元素 elements 淡入(将 adjusts opacity 不透明度 from 0 to 1 从 0 调整到 1)。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.fadeOut()使 Fades out 选定的 selected 元素 elements 淡出(将 adjusts opacity 不透明度 from 1 to 0 从 1 调整到 0)。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.fadeToggle()在 Toggles between 淡入 fading in 和淡出 fading out 之间切换。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.fadeTo()将 Adjusts 选定 selected 元素 elements 的 opacity 不透明度 to a specific value 调整到特定值。需要 Requires duration 持续时间 和 opacity value 不透明度值,可以接受 can accept a callback 回调函数。
.slideDown()通过 animating height 动画高度 使 Slides down 选定的 selected 元素 elements 向下滑动(显示 reveals)。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.slideUp()通过 animating height 动画高度 使 Slides up 选定的 selected 元素 elements 向上滑动(隐藏 hides)。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.slideToggle()在 Toggles between 向下滑动 sliding down 和向上滑动 sliding up 之间切换。可以接受 Can accept duration 持续时间 和 a callback 回调函数。
.animate()执行 Performs 一组 a set of CSS 属性 properties 的自定义 custom animation 动画。需要 Requires properties object 属性对象,可以接受 can accept duration 持续时间、easing 缓动函数、和 a callback 回调函数。
.stop()停止 Stops 在选定 selected 元素 elements 上当前 running 运行的 animation 动画。Optional arguments 可选参数 control 控制 clearing the queue 清除队列 和 completing the current animation 完成当前动画。
.delay()在 before the next item in the animation queue is executed 动画队列中的下一个项执行前 设置 Sets a delay 延迟(in milliseconds 毫秒)。
.finish()停止 Stops the current animation 当前动画,移除 removes all queued animations 所有排队的动画,并 completes 完成 all animations for the selected elements 选定元素的所有动画。
.queue()显示 Shows 或 or manipulates 操作 the queue of functions 函数队列 to be executed on the selected elements 将在选定元素上执行。
.dequeue()执行 Executes the next function on the queue 选定元素队列上的下一个函数 for the selected elements。
.clearQueue()移除 Removes all items from the queue 队列中 that have not yet been run 所有尚未运行的项。