input type=checkbox样式


* {
  font-size: 30px;
}

input[type=checkbox], input[type=radio] {display: none;}

input[type=checkbox] + label:before {
  content: "\2713";
  color: transparent;
  display: inline-block;
  border: 1px solid #000;
  font-size: 20px;    
  line-height: 22px;
  margin: -5px 5px 0 0;
  height: 20px;
  width: 20px;
  text-align: center;
  vertical-align: middle;
  transition: color ease .3s;
}

input[type=checkbox]:checked + label:before {
  color: #000;
}

input[type=radio] + label:before {
  content: "\26AB";
  border: 1px solid #000;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid #000;
  font-size: 20px;    
  line-height: 20px;
  margin: -5px 5px 0 0;
  height: 20px;
  width: 20px;
  text-align: center;
  vertical-align: middle;
  font-size: 0;    
  transition: font-size ease .3s;
}
input[type=radio]:checked + label:before {
  font-size: 20px;    
}

你可能感兴趣的:(input type=checkbox样式)