自定义radio按钮样式

<div class="table" >
<div class="body">
<h4 class="title">
<span class="label">表2-1</span><span class="caption">某年某</span>
</h4>
<table class="table">
<tbody>
<tr>
<th></th>
<th>122</th>
<th>222</th>
</tr>
<tr>
<td>a</td>
<td>18</td>
<td>200</td>
</tr>
<tr>
<td>b</td>
<td>19</td>
<td>150</td>
</tr>
<tr>
<td>c</td>
<td>20</td>
<td>100</td>
</tr>
<tr>
<td>d</td>
<td>21</td>
<td>75</td>
</tr>
<tr>
<td>e</td>
<td>22</td>
<td>50</td>
</tr>
</tbody>
</table>
</div>
</div>

input{
    outline:none !important;
}
//只复制.box-table 下的就可以,下面是定义其他按钮的
.table input[type="radio"],
 input[type="radio"],
 .radio input[type="radio"],
 .radio-inline input[type="radio"] {
    position: relative;
    margin-top: 3px;
    margin-right: 4px;
    vertical-align: top;
    border: none;
    background-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.table input[type="radio"]:before,
 input[type="radio"]:before,
 .radio input[type="radio"]:before,
 .radio-inline input[type="radio"]:before {
    position: absolute;
    left: 0;
    /*top: -3px;*/
    background-color: #2196f3;
    -webkit-transform: scale(0);
    -ms-transform: scale(0);
    -o-transform: scale(0);
    transform: scale(0);
}

.table input[type="radio"]:after,
 input[type="radio"]:after,
 .radio input[type="radio"]:after,
 .radio-inline input[type="radio"]:after {
    position: relative;
    top: -3px;
    border: 2px solid #666666;
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    -webkit-transition: 240ms;
    -o-transition: 240ms;
    transition: 240ms;
}
.table input[type="radio"]:after,
.table input[type="radio"]:before,
 input[type="radio"]:before,
 .radio input[type="radio"]:before,
 .radio-inline input[type="radio"]:before,
 input[type="radio"]:after,
 .radio input[type="radio"]:after,
 .radio-inline input[type="radio"]:after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    -webkit-transition: 240ms;
    -o-transition: 240ms;
    transition: 240ms;
}
.table input[type="radio"]:after,
.table input[type="radio"]:before,
.table input[type="radio"]:after{
    width: 15px;
    height: 15px;
    border-radius: 0;
}

.table input[type="radio"]:checked:before,
 input[type="radio"]:checked:before,
.radio input[type="radio"]:checked:before,
.radio-inline input[type="radio"]:checked:before {
    -webkit-transform: scale(.5);
    -ms-transform: scale(.5);
    -o-transform: scale(.5);
    transform: scale(.5);
}
.table input[type="radio"]:checked:after,
input[type="radio"]:checked:after,
.radio input[type="radio"]:checked:after,
.radio-inline input[type="radio"]:checked:after {
    border-color: #2196f3;
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值