CSS对单选按钮样式的修改

CSS使单选按钮变为普通button的样子选中变色

效果图

css

*{
margin: 0;
padding: 0;
}
body{
background: #f1f1f1;
}
li{
list-style: none;
}
.item {
width: 80px;
height: 44px;
line-height: 44px;
font-size: 15px;
overflow: hidden;
float: left;
text-align: center;
margin-bottom: 10px;
}
.item .type {
height: 41px;
line-height: 41px;
text-align: center;
background-color: #fff;
font-size: 15px;
display: block;
margin: 0 5px;
}
.radio {
position: absolute;
top: -9999px;
}
.item .type span {
height: 39px;
display: block;
border: 1px solid #fff;
display: block;
position: relative;
}
.item .radio:checked ~ span {
color: #74c742;
border-color: #74c742;
}

请选择教授的科目:

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值