热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

小程序修改radio及checkbox的选中背景色

  一:将默认多选框checkbox的默认选中背景红色改为绿色checkbox.wx-checkbox-input{border-radius:50%;width:20px;hei

 

 

一:将默认多选框checkbox的默认选中背景红色改为绿色

checkbox .wx-checkbox-input{
border-radius:50%;
width:20px;height:20px;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked{
border-color:#07c160 !important;
background:#07c160 !important;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
border-radius:50%;
width:20px;
height:20px;
line-height:20px;
text-align:center;
font-size:15px;
color:#fff;
background:transparent;
transform:translate(-50%, -50%) scale(1);
-webkit-transform:translate(-50%, -50%) scale(1);
}

  

 

二:将radio默认选中的红色改为绿色

radio .wx-radio-input{
border-radius:50%;
width:20px;

height:20px;
}
radio .wx-radio-input.wx-radio-input-checked{
border-color:#07c160 !important;
background:#07c160 !important;
}
radio .wx-radio-input.wx-radio-input-checked::before{
border-radius:50%;
width:20px;
height:20px;
line-height:20px;
text-align:center;
font-size:15px;
color:#fff;
background:transparent;
transform:translate(-50%, -50%) scale(1);
-webkit-transform:translate(-50%, -50%) scale(1);
}

  

 



推荐阅读
author-avatar
哥小名叫青蛙
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有