将
border-collapse:collapse添加到表中
The border-collapse CSS property determines whether a table’s borders
are separated or collapsed. In the separated model, adjacent cells
each have their own distinct borders. In the collapsed model, adjacent
table cells share borders.
The separated model is the traditional HTML table border model.
Adjacent cells each have their own distinct borders. The distance
between them given by the border-spacing property.
In the collapsed border model, adjacent table cells share borders. In
that model, the border-style value of inset behaves like groove, and
outset behaves like ridge.
table {
width: 100%;
border-collapse:collapse;
}
tr:nth-child(even) {
background: peachpuff;
}