css重写checkbox样式

  input[type=checkbox] {
        width:0.34rem;
        height:0.34rem; 
        text-align: center;
    }
  input[type=checkbox]:after {
      width: 100%;
      height: 100%;
      content:"";
      background-color:#fff;
      display: inline-block;
      border:1px solid #999;
      border-radius: 0.06rem;
  }
  input[type=checkbox]:checked:after {
      content: "\2713";/*UNICODE中对号*/
      font-size: 0.24rem;
      font-weight:bold;
      color: #fff;
      background-color: #017EC2;
  }

posted on 2020-01-07 16:29  |小乌龟|  阅读(424)  评论(0)    收藏  举报

导航