I have searched and searched, but haven't been able to find a solution for my requirement.
I have a plain ol' HTML table. I want round corners for it, without using images or JS, i.e. pure CSS only. Like this:
Rounded corners for corner cells, and 1px
thick border for the cells.
So far I have this:
table {
-moz-border-radius: 5px !important;
border-collapse: collapse !important;
border: none !important;
}
table th,
table td {
border: none !important
}
table th:first-child {
-moz-border-radius: 5px 0 0 0 !important;
}
table th:last-child {
-moz-border-radius: 0 5px 0 0 !important;
}
table tr:last-child td:first-child {
-moz-border-radius: 0 0 0 5px !important;
}
table tr:last-child td:last-child {
-moz-border-radius: 0 0 5px 0 !important;
}
table tr:hover td {
background-color: #ddd !important
}
But that leaves me without any borders for the cells. If I add borders, they aren't rounded!
Any solutions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…