jQuery fadeIn () method
Examples
Use fade in effect show all <p> elements:
$("button").click(function(){
$("p").fadeIn();
});
$("p").fadeIn();
});
try it"
Definition and Usage
fadeIn () method gradually change the opacity of the selected element, from the hidden to visible (fade).
Note: The hidden element is not completely displayed (no longer affects the layout of the page).
Tip: This method is usually fadeOut () used with the method.
grammar
$(selector).fadeIn(speed,easing,callback)
参数 | 描述 |
---|---|
speed | 可选。规定褪色效果的速度。 可能的值:
|
easing | 可选。规定在动画的不同点上元素的速度。默认值为 "swing"。 可能的值:
|
callback | 可选。fadeIn() 方法执行完之后,要执行的函数。
如需学习更多有关 callback 的内容,请访问我们的 jQuery Callback 这一章。 |
Try - Example
fadeIn () - use speed parameter
How to use speed parameter to a predetermined speed fade effect.
fadeIn () - the use of callback parameters
When using a fade-in effect display elements, how to use the callback parameter.