1 개요[ | ]
- FontAwesome Checkbox 2
- 폰트어썸 체크박스 2
html
Copy
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/>
<style>
input[type=checkbox] { display: none; }
input[type=checkbox] + label { cursor: pointer; }
input[type=checkbox] + label > div {
display: inline-block;
cursor: pointer;
vertical-align: middle;
background: white;
box-sizing: border-box;
width: 20px; height: 20px;
margin-top: -4px;
border: 1px solid #777;
border-radius: 2px;
}
input[type=checkbox]:checked + label > div:before {
font-family: FontAwesome;
color: #0b9;
content: "\f00c";
position: relative;
top: -2px; left: 1px;
}
</style>
<input type="checkbox" id="box1"><label for="box1"><div></div></label>
<br><br>
<input type="checkbox" id="box2"><label for="box2"><div></div> 동의합니다.</label>
<br><br>
<input type="checkbox" id="box3"><label for="box3"><div></div> 동의합니다.</label>
2 같이 보기[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.