编辑下面的代码:【加编码】
<html> <head> <style> table.ex1 { border-collapse:separate; border-spacing:10px; } table.ex2 { border-collapse:separate; border-spacing:10px 50px; } </style> </head> <body> <table class="ex1" border="1"> <tr> <td>Peter</td> <td>Griffin</td> </tr> <tr> <td>Lois</td> <td>Griffin</td> </tr> </table> <br> <table class="ex2" border="1"> <tr> <td>Cleveland</td> <td>Brown</td> </tr> <tr> <td>Glenn</td> <td>Quagmire</td> </tr> </table> <p><b>Note:</b> IE8 supports the border-spacing property if a !DOCTYPE is specified.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂