首页 > 微信 > 详细

修改小程序radio组件的默认样式

时间:2019-05-13 15:12:04      阅读:231      评论:0      收藏:0      [点我收藏+]
/* 默认背景样式*/
radio .wx-radio-input{
  width: 40rpx;
  height: 40rpx;
}

/* 选中后的 背景样式 (红色背景 无边框 可根据UI需求自己修改) */
radio .wx-radio-input.wx-radio-input-checked{
  width: 40rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  height: 40rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  border: none;
  background: #E1C371;
}
/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */
radio .wx-radio-input.wx-radio-input-checked::before{
  border-radius: 50%;/* 圆角 */
  width: 40rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  height: 40rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  line-height: 40rpx;
  text-align: center;
  font-size:30rpx; /* 对勾大小 30rpx */
  color:#fff; /* 对勾颜色 白色 */
  border: 1rpx solid #E1C371;
  background: #E1C371;
  transform:translate(-50%, -50%) scale(1);
  -webkit-transform:translate(-50%, -50%) scale(1);
}

 

修改小程序radio组件的默认样式

原文:https://www.cnblogs.com/Blogzlj/p/10856468.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!