我有一张桌子的样式并不像我想象的那样.
The left side border is too thick, and the background colour on the right doesn't quite fit perfectly within the border radius:
我不知道为什么会这样,有什么 idea 吗?我已经在MWE中包含了我的代码.
table {
font-family: Avenir, Helvetica, Arial, sans-serif;
width: 100%;
background-color: #ffffff;
border-collapse: collapse;
border-width: 2px;
border-color: #dedede;
border-style: solid;
color: #000000;
border-radius: 10px;
border-collapse: separate !important;
border-spacing: 0;
}
table td, table th {
border-right: solid 1px #dedede;
border-left: solid 1px #dedede;
padding: 10px;
}
table thead {
font-size: 1.6em;
}
table th:last-child {
border-right: 0px;
border-top-right-radius: 10px;
background-color: #edf2f4;
}
table td:last-child {
border-right: 0px;
background-color: #edf2f4;
}
.last-td {
border-right: 0px;
border-bottom-right-radius: 10px;
background-color: #edf2f4;
}
<table>
<thead>
<tr>
<th> alpha </th>
<th> beta </th>
</tr>
</thead>
<tbody>
<tr>
<td> lorem </td>
<td> lorem </td>
</tr>
</tbody>
</table>