<div id="wrap">
<div class="textBox">
<div class="checkbox">
<input type="checkbox" id="chk01">
<label for="chk01">라벨</label>
</div>
<div class="checkbox">
<input type="checkbox" id="chk02" checked>
<label for="chk02">checked</label>
</div>
</div>
</div>
.checkbox{display: inline-block;
input[type="checkbox"]{display: none;
&:checked+label{
&:before{background-image: url("../images/ico/ico-checkbox-checked.svg");
background-repeat: no-repeat; background-position: center; background-size: 25px 25px;
border: 0;}
}
}
label{vertical-align: middle; font-size: 14px; color: #222; font-family: 'Noto Sans';cursor: pointer;
&:before{content: ''; display: inline-block; width: 20px; height: 20px; border-radius: 4px; box-sizing: border-box;
margin-right: 5px; vertical-align: sub; border: 1px solid #ddd; background-color: #fff;}
}
+.checkbox{margin-left: 10px;}
}
.checkbox {
display: inline-block;
}
.checkbox input[type="checkbox"] {
display: none;
}
.checkbox input[type="checkbox"]:checked + label:before {
background-image: url("../images/ico/ico-checkbox-checked.svg");
background-repeat: no-repeat;
background-position: center;
background-size: 25px 25px;
border: 0;
}
.checkbox label {
vertical-align: middle;
font-size: 14px;
color: #222;
font-family: 'Noto Sans';
cursor: pointer;
}
.checkbox label:before {
content: '';
display: inline-block;
width: 20px;
height: 20px;
border-radius: 4px;
box-sizing: border-box;
margin-right: 5px;
vertical-align: sub;
border: 1px solid #ddd;
background-color: #fff;
}
.checkbox + .checkbox {
margin-left: 10px;
}
아래 주소를 복사하여 다른 곳에 붙여넣으세요.