<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>border-collapse</title> <style> /*参考:http://www.w3school.com.cn/cssref/pr_tab_border-collapse.asp*/ table { /*默认值:separate*/ /*border-collapse: collapse;*/ } table, td, th { border: 1px solid black; } </style> </head> <body> <table> <tr> <th>Firstname</th> <th>Lastname</th> </tr> <tr> <td>Bill</td> <td>Gates</td> </tr> <tr> <td>Steven</td> <td>Jobs</td> </tr> </table> <p><b>注释:</b>如果没有规定 !DOCTYPE,border-collapse 属性可能会引起意想不到的错误。</p> </body> </html>
css border-collapse.html
最新推荐文章于 2021-05-31 16:20:18 发布