W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript" src="/jquery/jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $(".btn1").click(function(){ $("table").animate({borderSpacing:"10px"},"slow"); }); $(".btn2").click(function(){ $("table").animate({borderSpacing:"2px"},"slow"); }); }); </script> <style> table{border:1px solid black;} td{border:1px solid black;} </style> </head> <body> <table> <tr> <td>Peter</td> <td>Griffin</td> </tr> <tr> <td>Lois</td> <td>Griffin</td> </tr> </table> <button class="btn1">Animate</button> <button class="btn2">Reset</button> </body> </html>