본문 바로가기

css

[css] input radio 커스텀 하기

input[type='radio']{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 50%;
  outline: none;
}

input[type='radio']:before{
  content: '';
  display: block;
  width: 70%;
  height: 70%;
  margin: 15% auto;  
  border-radius: 100%;  
}

input[type='radio']:checked:before{
  background: #00b795;
}

input[type='radio']:checked{
  border: 1px solid #00b795;
}

 

위의 값을 지정해주면 아래처럼 적용된다.