小程序radio组件样式


根据自己项目要求修改颜色按钮大小即可

radio .wx-radio-input {
  /* 自定义样式.... */
  height: 24rpx;
  width: 24rpx;
  margin-top: -4rpx;
  border-radius: 50%;
  border: 2rpx solid #999;
  background: transparent;
}


radio .wx-radio-input.wx-radio-input-checked::before {
  border-radius: 50%; /* 圆角 */
  width: 28rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  height: 28rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  line-height: 28rpx;
  text-align: center;
  font-size: 30rpx; /* 对勾大小 30rpx */
  color: #fff; /* 对勾颜色 白色 */
  background: #0076fe;
  transform: translate(-50%, -50%) scale(1);
  -webkit-transform: translate(-50%, -50%) scale(1);
}

文章作者: Born to the sun
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Born to the sun !
评论