6.2 .animate() 函式動畫效果
.animate() 函式:css 及 時間
比較以下兩個程式:
程式一:
程式二:
範例:6_2_animate.html
Easing 參數
第三個參數,可以是 swing
(預設)或 linear
:6_2_animate_easing.html
Complete Function 參數
動畫效果跑完後,執行自訂程式,也就是第四個參數,帶入自訂程式的 function:
範例:留言區域
1、先瞭解 .prop("scrollHeight")
:
2、瞭解 animate 當中的 scrollTop:
上述重點:
範例:6_2_animate_message.html
Last updated