表格(如果有启用border)外边框始终会存在一层border
通过背景色遮挡缝隙
table {
background-color: black;
}
tr {
background-color: white;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
table {
background-color: black;
}
tr {
background-color: white;
}
</style>
</head>
<body>
<table
align="center"
border="1"
cellpadding="10px"
cellspacing="0px"
width="500"
height="249"
>
<tr>
<th>及格否</th>
<th>姓名</th>
<th>分数</th>
</tr>
<tr>
<th>及格</th>
<th>小明</th>
<th>88</th>
</tr>
<tr>
<th>及格</th>
<th>小红</th>
<th>86</th>
</tr>
<tr>
<th>不及格</th>
<th>小军</th>
<th>56</th>
</tr>
</table>
</body>
</html>