라디오 버튼 스타일 변경 하기
브라우저 별로 다르게 보이는 라디오 버튼 디자인 -
리셋하고 다시 스타일 주기!
HTML
<div class="checks">
<input type="radio" id="ex_rd" name="ex_rds">
<label for="ex_rd">커스텀스타일1 </label>
<input type="radio" id="ex_rd2" name="ex_rds">
<label for="ex_rd2">커스텀스타일2</label>
</div>
CSS
.checks {
position: relative;
height: 20px;
padding: 30px;
line-height: 20px;
}
.checks label {
font-size: 16px;
color: #666;
margin-right: 10px;
vertical-align: middle;
}
.checks input[type="radio"] {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.checks input[type="radio"]+label {
display: inline-block;
position: relative;
padding-left: 25px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.checks input[type="radio"]+label:before {
content: '';
position: absolute;
left: 4px;
top: 0px;
width: 14px;
height: 14px;
text-align: center;
background: #fff;
border: 1px solid #cacece;
border-radius: 100%;
box-shadow: none;
}
.checks input[type="radio"]:checked+label:before {
background: #fff;
border-color: #e86138;
}
.checks input[type="radio"]:checked+label:after {
content: '';
position: absolute;
top: 1px;
left: 5px;
width: 14px;
height: 14px;
background: #e86138;
border-radius: 100%;
box-shadow: none;
}
728x90
반응형
'퍼블리싱' 카테고리의 다른 글
[CSS 활용]헤더가 고정 되는 테이블, html css (0) | 2022.04.08 |
---|---|
[JS 활용] 탭 영역 만들기 - 자바스크립트, css , html5 활용 (0) | 2022.03.29 |
[CSS 활용] 화살표, css로 만들기 (0) | 2022.03.17 |
[JS 활용] 관련 사이트, family site 패밀리 사이트, 제이쿼리 활용 [토글] (0) | 2022.03.15 |
[CSS 활용] 투명한 스크롤바 - 내용위에 오버레이 되는 스크롤바 (0) | 2022.01.17 |
댓글