编辑下面的代码:【加编码】
<html> <head> <script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function() { $("#btn1").click(function(){ $("div").animate({height:"300px"}); $("div").animate({width:"600px"}); $("div").delay(1200).animate({height:"900px"}); }); }); </script> </head> <body> <p>This example demonstrates the animate() method with three merged boxes.</p> <p>The third box is set to delay() for 1200 milliseconds.</p> <div style="background:purple;height:100px;width:100px;margin:6px;"> </div> <p><button id="btn1">Animate</button></p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂