css单选框不能附加颜色吗,element里面的单选框的color怎样修改?默认是蓝色的,使用css修改颜色不管用,大家想一下...

满意答案

00e27ab806e4881f8254fe7ae8741834.png

专攻美兽没商量

2019.05.23

00e27ab806e4881f8254fe7ae8741834.png

采纳率:52%    等级:8

已帮助:1207人

应该是border: 1px solid rgb(9, 9, 9);

rgb后面的就是颜色

还要分选中前和选中后,两个都要写样式追答: //html

//css部分

/**

* 单选框自定义样式

**/

input[type=radio]{

/*去除浏览器默认样式*/

-webkit-appearance: none;

-moz-appearance: none;

appearance: none;

/*自定义样式*/

position: relative;

display: inline-block;

vertical-align: top;

width: 20px;

height: 20px;

border: 1px solid #00bfff;

outline: none;

cursor: pointer;

/*设置为圆形,看起来是个单选框*/

-webkit-border-radius: 20px;

-moz-border-radius: 20px;

border-radius: 20px;

}

/**

* 单选框 选中之后的样式

**/

input[type=radio]:after{

content: '';

position: absolute;

width: 12px;

height: 12px;

display: block;

left: 0;

top: 0;

right: 0;

bottom: 0;

margin: auto;

background: #00bfff;

-webkit-border-radius: 12px;

-moz-border-radius: 12px;

border-radius: 12px;

-webkit-tr

00分享举报

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值