使用CSS制作一张带有四个圆角的表格
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> table { border-collapse: separate; } table tr td { padding: 5px; border-radius: 4px; } </style> </head> <body> <table border="1"> <tr> <td>商品名称</td> <td>单价</td> <td>数量</td> <td>合计</td> <td>产地</td> </tr> </table> </body> </html>
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> table { border-collapse: separate; } table tr td { padding: 5px; border-radius: 4px; } </style> </head> <body> <table border="1"> <tr> <td>商品名称</td> <td>单价</td> <td>数量</td> <td>合计</td> <td>产地</td> </tr> </table> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
行实例 »
点击 "运行实例" 按钮查看在线实例