html – 如何将边界半径应用于Bootstrap 3的表?

前端之家收集整理的这篇文章主要介绍了html – 如何将边界半径应用于Bootstrap 3的表?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我希望桌子的顶角和底角有圆角.

我怎样才能做到这一点?现在,Bootstrap 3表的半径为0.

解决方法

试试这个 :-
<table class="table table-curved">
    ....
</table>    

.table-curved {
    border-collapse: separate;
}
.table-curved {
    border: solid #ccc 1px;
    border-radius: 6px;
    border-left:0px;
}
.table-curved td,.table-curved th {
    border-left: 1px solid #ccc;
    border-top: 1px solid #ccc;
}
.table-curved th {
    border-top: none;
}
.table-curved th:first-child {
    border-radius: 6px 0 0 0;
}
.table-curved th:last-child {
    border-radius: 0 6px 0 0;
}
.table-curved th:only-child{
    border-radius: 6px 6px 0 0;
}
.table-curved tr:last-child td:first-child {
    border-radius: 0 0 0 6px;
}
.table-curved tr:last-child td:last-child {
    border-radius: 0 0 6px 0;
}
原文链接:https://www.f2er.com/html/228554.html

猜你在找的HTML相关文章