纯css radio button样式

 <div class="inRadio RadioStyle">
                  <input type="radio" checked onclick="editWareHouseIt(this)" id="editOrInsHouse01"
                     name="editOrInsHouse" value="01">
                  <label for="editOrInsHouse01">按钮一</label>
                  <input type="radio" onclick="editWareHouseIt(this)" id="editOrInsHouse02" name="editOrInsHouse"
                     value="02">
                  <label for="editOrInsHouse02">按钮二</label>
               </div>
.RadioStyle input {
  display: none
}

.RadioStyle label {
  border: 1px solid #00a4ff;
  color: #fff;
  line-height: 28px;
  min-width: 80px;
  text-align: center;
  float: left;
  font-size: 10px;
  border-radius: 4px
}

.RadioStyle input:checked+label {
  border: 1px solid #00a4ff;
  background-size: 21px 21px;
  color: #fff;
  background-color: #00a4ff;
}

.RadioStyle input:disabled+label {
  opacity: 0.7;
}

 

纯css radio button样式

上一篇:GKCTF2020三道web题目


下一篇:IDEA上传项目到GitHub仓库详细步骤