Tidak mencoba mengambil kredit apa pun di sini, semua kredit diberikan ke @theazureshadow untuk balasannya, tetapi saya pribadi harus menyesuaikannya untuk tabel yang memiliki beberapa <th>alih-alih <td>untuk sel baris pertama itu.
Saya baru saja memposting versi modifikasi di sini jika beberapa dari Anda ingin menggunakan solusi @ theazureshadow, tetapi seperti saya, miliki beberapa <th>terlebih dahulu <tr>. Kelas "reportTable" hanya harus diterapkan ke tabel itu sendiri .:
table.reportTable {
border-collapse: separate;
border-spacing: 0;
}
table.reportTable td {
border: solid gray 1px;
border-style: solid none none solid;
padding: 10px;
}
table.reportTable td:last-child {
border-right: solid gray 1px;
}
table.reportTable tr:last-child td{
border-bottom: solid gray 1px;
}
table.reportTable th{
border: solid gray 1px;
border-style: solid none none solid;
padding: 10px;
}
table.reportTable th:last-child{
border-right: solid gray 1px;
border-top-right-radius: 10px;
}
table.reportTable th:first-child{
border-top-left-radius: 10px;
}
table.reportTable tr:last-child td:first-child{
border-bottom-left-radius: 10px;
}
table.reportTable tr:last-child td:last-child{
border-bottom-right-radius: 10px;
}
Jangan ragu untuk menyesuaikan bantalan, radius, dll agar sesuai dengan kebutuhan Anda. Semoga bisa membantu orang!