티스토리 뷰
HMLT&CSS&JS/study
[모던웹] 17.11 jQuery UI Effect 프러그인 (2) – easing 플러그인 (ease)
turfrain 2014. 3. 17. 13:5417.11 jQuery UIEffect 플러그인 (2) – easing 플러그인
1) 기존 jQuery를 사용할 때 교과 관련 메서드의 easing 속성에 문자열
“swing” ,”linear” 만으로 Easing을 줄수있다.
표17-7 다양한 종류의easing 속성
linear | swing |
|
easeInElastic | easeOutElastic | easeInOutElastic |
easeInBack | easeOutBack | easeInOutBack |
easeInBounce | easeOutBounce | easeInOutBounce |
easeInSine | easeOutSine | easeInOutSine |
easeInQuad | easeOutQuad | easeInOutQuad |
easeInCubic | easeOutCubic | easeInOutCubic |
easeInCirc | easeOutCirc | easeInOutCirc |
easeInQuart | easeOutQuart | easeInOutQuart |
easeInQuint | easeOutQuint | easeInOutQuint |
! easing.html : http://jqueryui.com/effect/#easing
코드17-32 easing속성을 사용한 animate()메서드
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- div {
- background-color:Orange;
- }
- </style>
- <script src="http://code.jquery.com/jquery-1.7.js"></script>
- <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
- <script>
- // 이벤트를 연결합니다.
- // 변수를 선언합니다.
- // animate() 메서드를 사용합니다.
- });
- });
- </script>
- </head>
- <body>
- <select>
- <option>linear</option>
- <option>swing</option>
- <option>easeInQuad</option>
- <option>easeOutQuad</option>
- <option>easeInOutQuad</option>
- <option>easeInCubic</option>
- <option>easeOutCubic</option>
- <option>easeInOutCubic</option>
- <option>easeInQuart</option>
- <option>easeOutQuart</option>
- <option>easeInOutQuart</option>
- <option>easeInQuint</option>
- <option>easeOutQuint</option>
- <option>easeInOutQuint</option>
- <option>easeInSine</option>
- <option>easeOutSine</option>
- <option>easeInOutSine</option>
- <option>easeInExpo</option>
- <option>easeOutExpo</option>
- <option>easeInOutExpo</option>
- <option>easeInCirc</option>
- <option>easeOutCirc</option>
- <option>easeInOutCirc</option>
- <option>easeInElastic</option>
- <option>easeOutElastic</option>
- <option>easeInOutElastic</option>
- <option>easeInBack</option>
- <option>easeOutBack</option>
- <option>easeInOutBack</option>
- <option>easeInBounce</option>
- <option>easeOutBounce</option>
- <option>easeInOutBounce</option>
- </select>
- <button>MOVE</button>
- <div></div>
- </body>
- </html>
코드17-32 easing속성을 사용한 animate()메서드 custom
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- *{
- margin:0 ; padding:0;
- }
- .motion {
- background-color:Orange;
- /* 패딩값을주면 값만틈 움직임에 영향이 있습니다.
- * padding:5px 1px 1px 15px;*/
- }
- #boxs {
- background-color:#333;
- padding : 10px 0px 10px 0px;
- }
- </style>
- <script src="http://code.jquery.com/jquery-1.7.js"></script>
- <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
- <script>
- // 이벤트를 연결합니다.
- // 변수를 선언합니다.
- // animate() 메서드를 사용합니다.
- .delay(2000)
- });
- });
- });
- </script>
- </head>
- <body>
- <button id="btn1">MOVE BTN</button>
- <br/> <br/>
- <div id="boxs">
- <div class="motion">linear</div>
- <br/>
- <div class="motion">swing</div>
- <br/>
- <div class="motion">easeInOutElastic</div>
- <br/>
- <div class="motion">easeInOutBack</div>
- <br/>
- <div class="motion">easeInOutBounce</div>
- <br/>
- <div class="motion">easeInOutSine</div>
- <br/>
- <div class="motion">easeInOutQuad</div>
- <br/>
- <div class="motion">easeInOutCubic</div>
- <br/>
- <div class="motion">easeInOutCirc</div>
- <br/>
- <div class="motion">easeInOutQuart</div>
- <br/>
- <div class="motion">easeInOutQuint</div>
- </div>
- </body>
- </html>
출처 : javaScript jQuery 입문
'HMLT&CSS&JS > study' 카테고리의 다른 글
퍼블리싱_초급 doc (0) | 2023.02.16 |
---|---|
[모던웹]6.10~18_객체지향 프로그래밍 (0) | 2014.03.17 |
[모던웹]17.9 ~10 jQuery UI Effect (1) 플러그인 _ (참고사항 추가) (0) | 2014.03.17 |
[모던웹] 17.8 jQuery Approach플러그인 (0) | 2014.03.17 |
[모던웹] 17.7 애니메이션 지연 (0) | 2014.03.17 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday