JQuery 自定义动画案例

xiaoxiao2021-02-28  147

<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>自定义动画</title>     <script src ="./jq183.js"></script> </head> <body> 语法: animate(params,[speed],[easing],[fn]); <hr> <input type="button" value="animate" id="ani"> <br> <hr> <!--图片飞走的过程中 透明度逐渐降低 注意 img中的position 样式属性不能没有--> <img src="./flower1.jpg" alt="" id="re" style="position: relative"> </body> <script>   $('#ani').click(function(){         $('#re').animate(                 {left:"1000", top:"-100",opacity:'0'},                 3000,                 function(){                     alert("成全你!");                 })     }); </script> </html>
转载请注明原文地址: https://www.6miu.com/read-40410.html

最新回复(0)