Sublime Text
<!DOCTYPE html> <html> <head> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.0.min.js"></script> <style type="text/css"> table{ border-collapse:separate; } table, th, td{ border:1px solid black; } </style> </head> <body> <button type="button">Click here</button> <br><br> <table> <tr> <th>Họ tên</th> <th>Quê quán</th> </tr> <tr> <td>Nguyễn Thành A</td> <td>Cần Thơ</td> </tr> <tr> <td>Nguyễn Thành B</td> <td>Vĩnh Long</td></tr> <tr> <td>Nguyễn Thành C</td> <td>Sóc Trăng</td> </tr> </table> <script> $(document).ready(function(){ $("button").click(function(){ $("table").animate({borderSpacing:"20px"}); }); }); </script> </body> </html>
<!DOCTYPE html> <html> <head> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.0.min.js"></script> <style type="text/css"> table{ border-collapse:separate; } table, th, td{ border:1px solid black; } </style> </head> <body> <button type="button">Click here</button> <br><br> <table> <tr> <th>Họ tên</th> <th>Quê quán</th> </tr> <tr> <td>Nguyễn Thành A</td> <td>Cần Thơ</td> </tr> <tr> <td>Nguyễn Thành B</td> <td>Vĩnh Long</td></tr> <tr> <td>Nguyễn Thành C</td> <td>Sóc Trăng</td> </tr> </table> <script> $(document).ready(function(){ $("button").click(function(){ $("table").animate({borderSpacing:"20px"}); }); }); </script> </body> </html>