table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
}
table td {
border: 1px solid rgb(226, 226, 226);
border-left: none;
border-bottom: none;
padding: 5px;
}
table tr:first-child td:first-child {
border-top-left-radius: 5px; /* 设置table左下圆角 */
}
table tr:first-child td:last-child {
border-top-right-radius: 5px; /* 设置table右下圆角 */
}
table tr:last-child td:first-child {
border-bottom-left-radius: 5px; /* 设置table左下圆角 */
}
table tr:last-child td:last-child {
border-bottom-right-radius: 5px; /* 设置table右下圆角 */
}
table tr td:first-child {
border-left: 1px solid rgb(226, 226, 226);
}
table tr:last-child td {
border-bottom: 1px solid rgb(226, 226, 226);
}
caution
table的border须为 border-collapse: separate;否则border-radius不生效