51help TIY
码:
<html> <head> <script type="text/javascript" src="../jquery/jquery.js" tppabs="http://www.51help.tk/jquery/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".btn1").click(function(){ $("p").animate({minHeight:"100px"}); }); $(".btn2").click(function(){ $("p").animate({minHeight:""}); }); }); </script> </head> <body> <p style="background-color:yellow;">This is a paragraph.</p> <button class="btn1">Animate</button> <button class="btn2">Reset</button> </body> </html>
查看结果: