你的位置:首页 > 软件开发 > Java > jQuery中关于如何使用animate自定义动画

jQuery中关于如何使用animate自定义动画

发布时间:2016-05-29 15:00:07
动画 animate()  01.animate()方法的简单使用  有些复杂的动画通过之前学到的几个动画函数是不能够实现,这时候就是强大的animate方法了。  操作一个元素执行3秒的淡入动画,对比下一下2组动画设置的区别。$(elem).fadeOut(3000) $(el ...

jQuery中关于如何使用animate自定义动画

动画 animate()

  01.animate()方法的简单使用

  有些复杂的动画通过之前学到的几个动画函数是不能够实现,这时候就是强大的animate方法了。

  操作一个元素执行3秒的淡入动画,对比下一下2组动画设置的区别。

$(elem).fadeOut(3000) $(elem).animate({    opacity:0},3000)

列出常用的方式

 1 $('#elem').animate({ 2   width: 'toggle',  3   height: 'toggle' 4  }, { 5   duration: 5000, 6   specialEasing: { 7    width: 'linear', 8    height: 'easeOutBounce' 9   },10   complete: function() {11    $(this).after('<div>Animation complete.</div>');12   }13  });

原标题:jQuery中关于如何使用animate自定义动画

关键词:jquery

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录