修改input复选框样式


效果:

 

 代码:

input[type='checkbox'] {
      cursor: pointer;
      position: relative;
      width: 18px;
      height: 18px;
      font-size: 16px;
      visibility: hidden;
    }
   input[type='checkbox']::after {
      position: absolute;
      top: 0;
      background-color: #fff;
      color: #fff;
      border: 1px solid #b1b1b1;
      width: 18px;
      height: 18px;
      display: inline-block;
      visibility: visible;
      padding-left: 0px;
      text-align: center;
      content: ' ';
      border-radius: 50%;
      box-sizing: border-box;
    }

    input[type='checkbox']:checked::after {
      background-color: $color-main;
      border: none;
      content: '\2713';
      font-size: 14px;
      font-weight: bold;
    }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM