html表格离左侧px远,html – 如何在表格行和表格边缘之间有左右间距?

这是期望的效果:

// table

.sw-table {

border-collapse: separate;

thead {

background-color: $orange;

color: $white;

font-size: 15px;

th {

border: none !important;

font-weight: 600;

padding-top: 5px !important;

padding-bottom: 5px !important;

margin: 30px 27px !important;

&:first-child {

border-top-left-radius: 10px;

padding-left: 25px;

}

&:last-child {

border-top-right-radius: 10px;

}

}

}

tbody {

color: $black;

tr {

td {

border-color: $greyish;

padding-top: 10px !important;

padding-bottom: 10px !important;

}

td:first-child {

border-left: 1px solid $greyish;

padding-left: 25px;

}

td:last-child {

border-right: 1px solid $greyish;

}

&:first-child td {

border-top: none;

}

&:last-child td {

border-bottom: 1px solid $greyish;

&:first-child {

border-bottom-left-radius: 10px;

}

&:last-child {

border-bottom-right-radius: 10px;

}

}

}

}

}

它只是缺少表格行和表格边框之间的空格.我尝试过使用边距,填充,边框,边框折叠但我无法达到预期的效果.任何想法?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值