<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Jquery特效 - animation</title> <script src="jquery.js"></script> <style> div { width:300px; height:80px; background:#CCCCCC; margin:20px; text-align:center;} </style> </head> <body> <div id="test1"> 点击运行动画 <br/> animate( {width:"400px",opacity:0.3,height:"400px"},3000 ) </div> <script> $("#test1").on("click",function(){ $(this).animate({width:"400px",opacity:0.3,height:"400px"},3000,function(){alert("callback")}); }); </script> </body> </html>
Javascript高级——7.属性animate动画
猜你喜欢
转载自blog.csdn.net/superstatus/article/details/80588784
今日推荐
周排行