jQuery 페이드인() 메서드
예시
모든 <p> 요소를 페이드 인:
$("button").click(function(){
$("p").fadeIn();
});
정의 및 사용
fadeIn() 메서드는 선택한 요소의 불투명도를 숨김에서 표시(페이딩 효과)로 점진적으로 변경합니다.
참고 : 숨겨진 요소는 전혀 표시되지 않습니다(더 이상 페이지 레이아웃에 영향을 미치지 않음).
팁: 이 메서드는 종종 fadeOut() 메서드 와 함께 사용됩니다 .
통사론
$(selector).fadeIn(speed,easing,callback)
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the fading effect. Default value is 400 milliseconds Possible values:
|
easing | Optional. Specifies the speed of the element in different points of the animation. Default value is "swing" Possible values:
|
callback | Optional. A function to be executed after the fadeIn() method is completed
To learn more about callback, visit our jQuery Callback chapter |
직접 해보십시오 - 예
사용 속도 매개변수를 사용하여 페이딩 효과의 속도를 지정하는 방법입니다.
사용 요소를 페이드 인 및 페이드 아웃할 때 콜백 매개변수를 사용하는 방법입니다.