更改微信小程序的組件默認樣式


  • checkbox   

  /*checkbox 整體大小  */
  .checkbox {
      width: 12%;
      /* height: 240rpx; */
  }
  /*checkbox 選項框大小  */
  checkbox .wx-checkbox-input {
      width: 36rpx;
      height: 36rpx;
      border-radius: 50%;
  }
  /*checkbox選中后樣式  */
  checkbox .wx-checkbox-input.wx-checkbox-input-checked {
      border: none;
      background: #FF8383;
  }
  /*checkbox選中后圖標樣式  */
  checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
      width: 30rpx;
      height: 30rpx;
      line-height: 30rpx;
      text-align: center;
      font-size: 22rpx;
      color: #fff;
      background: transparent;
      transform: translate(-50%, -50%) scale(1);
      -webkit-transform: translate(-50%, -50%) scale(1);
  }
  • button

  /* button 重置樣式 */
  button {
      padding: 0;
      background: none;
      border-radius: 0;
  }
  button::after {
      border: none;
  }
  /** 按鈕的默認樣式:必須“提升指定樣式規則的應用優先權(!important)。” **/
  button[disabled] {
      color: #fff !important;
      background: linear-gradient(-12deg, rgba(47, 30, 136, .3) 0%, rgba(205, 3, 128, 0.3) 100%) !important;
  }
 


免責聲明!

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



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