<!DOCTYPE html>
<html>
<head>
<style>
table, td, th {
border: 1px solid black;
}
#table1 {
border-collapse: separate;
border-spacing: 15px;
}
#table2 {
border-collapse: separate;
border-spacing: 15px 50px;
}
</style>
</head>
<body>
<h2>border-spacing: 15px:</h2>
<p>当使用“border-collapse: separate”时,border-spacing 属性可用于设置单元格之间的间距:</p>
<table id="table1">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
</table>
<h2>border-spacing: 15px 50px:</h2>
<p>使用两个值(第一个设置水平间距,第二个设置垂直间距):</p>
<table id="table2">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>