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


 

 

一:將默認多選框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); }

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM