jQuery效果 - 动画animate()
2017-09-13 10:59
459 查看
animate:执行一组CSS属性的自定义动画。
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>animate demo</title> <style> div { position: relative; background-color: #abc; width: 40px; height: 40px; float: left; margin: 5px; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <p><button id="go">Run »</button></p> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <script> $( "#go" ).click(function() { $( ".block:first" ).animate({ left: 100 }, { duration: 1000, step: function( now, fx ){ $( ".block:gt(0)" ).css( "left", now ); } }); }); </script> </body> </html>
相关文章推荐
- jquery animate 动画效果使用解析
- jQuery动画效果animate和scrollTop结合使用实例
- jQuery-动画效果animate() slideDown() slideUp() fadeIn() fadeOut()
- jQuery动画效果animate和scrollTop结合使用实例
- 用js实现类似jquery里的animate动画效果
- 【Jquery】jquery动画效果animate
- jQuery动画效果animate和scrollTop结合使用实例
- jquery学习之tab切换及动画效果,涉及animate(),siblings()
- jQuery动画效果animate和scrollTop结合使用实例
- Jquery使用animate实现css3的transform动画效果
- jQuery中animate()动画效果的实现
- jQuery动画效果animate和scrollTop结合使用实例
- js实现类似jquery里animate动画效果的方法
- 利用jQuery的动画函数animate实现豌豆发射效果
- 关于火狐中使用jquery的animate做动画效果的问题解决
- jQuery学习教程七: jQuery 效果 - 动画 animate
- jQuery动画效果animate和scrollTop结合使用实例
- jquery animate 动画效果使用说明
- jquery结合animate.css 动画效果的实现
- 【jQuery】调用animate()方法制作简单的动画效果