table添加圆角效果

table td, table th{
  border-top: 2px solid #e9e9e9;
  border-left: 2px solid #e9e9e9;
}
table tr td:last-child, table tr th:last-child{
  border-right: 2px solid #e9e9e9;
}
table tr:last-child td{
  border-bottom: 2px solid #e9e9e9;
}
table tr:first-child td:first-child, table tr:first-child th:first-child{
  border-top-left-radius: 5px;
}
table tr:first-child td:last-child, table tr:first-child th:last-child{
  border-top-right-radius: 5px;
}
table tr:last-child td:first-child {
  border-bottom-left-radius: 5px;
}
table tr:last-child td:last-child {
  border-bottom-right-radius: 5px;
}

//:  border-collapse: collapse; 会和 border-radius冲突!!!!

猜你喜欢

转载自blog.csdn.net/u011025329/article/details/78664892
今日推荐