1.20 JQuery3:動畫和特效
版權宣告:本文為博主尹成聯絡QQ77025077,微信18510341407原創文章,歡迎轉載侵權不究。 https://blog.csdn.net/yincheng01/article/details/83960170
jquery動畫
通過animate方法可以設定元素某屬性值上的動畫,可以設定一個或多個屬性值,動畫執行完成後會執行一個函式。
$('#div1').animate({ width:300, height:300 },1000,swing,function(){ alert('done!'); });
引數可以寫成數字表達式:
$('#div1').animate({ width:'+=100', height:300 },1000,swing,function(){ alert('done!'); });
jquery特殊效果
fadeIn() 淡入 $btn.click(function(){ $('#div1').fadeIn(1000,'swing',function(){ alert('done!'); }); }); fadeOut() 淡出 fadeToggle() 切換淡入淡出 hide() 隱藏元素 show() 顯示元素 toggle() 依次展示或隱藏某個元素 slideDown() 向下展開 slideUp() 向上捲起 slideToggle() 依次展開或捲起某個元素
-
學院Go語言視訊主頁
ofollow,noindex" target="_blank">https://edu.csdn.net/lecturer/1928 -
掃碼獲取海量視訊及原始碼 QQ群:721929980