/*--相关的单选复选按钮--*/
@keyframes hover-color {       /**复选框或单选框  边框 hover**/
  from {
    border-color: #CECECE; }
  to {
    border-color: #4A90E2; } }

.magic-radio,
.magic-checkbox {           /**必须要把    radio和 checkbox的隐藏或者切割掉**/
  position: absolute;
  display: none; }

.magic-radio[disabled],           /**radio   checkbox   指定disabled   html属性时的鼠标指针**/
.magic-checkbox[disabled] {
  cursor: not-allowed; }

.magic-radio + label,
.magic-checkbox + label {
  position: relative;
  display: block;
  padding-left: 30px;
  cursor: pointer;
  vertical-align: middle;
  }
  .magic-radio + label:hover:before,     /*选矿的 hover边框动画  */
  .magic-checkbox + label:hover:before {
    animation-duration: 0.4s;
    animation-fill-mode: both;
    animation-name: hover-color; }
  .magic-radio + label:before,
  .magic-checkbox + label:before {/*用before来模拟选框的框*/
    position: absolute;
    top: -9px;
    left: 0;
    display: inline-block;
    width: 16px;
    height: 16px;
    content: '';
    border: 1px solid #CECECE; }
  .magic-radio + label:after,
  .magic-checkbox + label:after {/*用after模拟选框的 对号或园点    默认先隐藏*/
    position: absolute;
    display: none;
    content: '';
    }

.magic-radio[disabled] + label,
.magic-checkbox[disabled] + label {/*选框  被禁用时的外观*/
  cursor: not-allowed;
  color: #e4e4e4;
  }
  .magic-radio[disabled] + label:hover, .magic-radio[disabled] + label:before, .magic-radio[disabled] + label:after,
  .magic-checkbox[disabled] + label:hover,
  .magic-checkbox[disabled] + label:before,
  .magic-checkbox[disabled] + label:after {
    cursor: not-allowed; }/*禁用时的指针*/
  .magic-radio[disabled] + label:hover:before,
  .magic-checkbox[disabled] + label:hover:before {
    border: 1px solid #e4e4e4;
    animation-name: none; }/*禁用时的选框和填充*/
  .magic-radio[disabled] + label:before,
  .magic-checkbox[disabled] + label:before {
    border-color: #e4e4e4; }

.magic-radio:checked + label:before,
.magic-checkbox:checked + label:before {
  animation-name: none; }/*选框被选中时  去掉hover 动画*/

.magic-radio:checked + label:after,
.magic-checkbox:checked + label:after {/*选框被选中时  显示after填充*/
  display: block;
  }

.magic-radio + label:before {/*radio的选框应该是个圆形*/
  border-radius: 50%; }

.magic-radio + label:after {/*模拟出radio的园点填充*/
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4A90E2; }

.magic-radio:checked + label:before {
  border: 1px solid #4A90E2; }

.magic-radio:checked[disabled] + label:before {
  border: 1px solid #c9e2f9;
  background: #ccc; 
}

.magic-radio:checked[disabled] + label:after {
  background: #c9e2f9; }

.magic-checkbox + label:before {
  border-radius: 0px; }

.magic-checkbox + label:after {/*模拟出checkbox选框的对号填充*/
  top: -7px;
  left: 6px;
  box-sizing: border-box;
  width: 4px;
  height: 11px;
  transform: rotate(45deg);
  border-width: 2px;
  border-style: solid;
  border-color: #fff;
  border-top: 0;
  border-left: 0; }

.magic-checkbox:checked + label:before {
  border: #4A90E2;
  background: #4A90E2; }

.magic-checkbox:checked[disabled] + label:before {
  border: #ccc;
  background: #ccc; }