CSS¸¸À¸·Î, üũ¹Ú½º¿Í ¶óµð¿À¿Í °°Àº ÀÎDz°³Ã¼¿¡
¾Ö´Ï¸ÞÀÌ¼Ç È¿°ú¸¦ Àû¿ëÇÒ ¼ö ÀÖ´Â ¹æ¹ýÀÔ´Ï´Ù.
¾Æ·¡¿¡¼ ¼Ò½º¸¦ È®ÀÎÇϽðí,
½ÇÁ¦ ±¸µ¿µÇ´Â ³»¿ëÀº URL¿¡ ÀÖ´Â Âü°í»çÀÌÆ®·Î
º¸½Ã±â ¹Ù¶ø´Ï´Ù.
HTML
<div class="wrap">
<input type="checkbox" id="select0" class="checkbox">
<label for="select0" class="input-label checkbox">üũ¹Ú½º1</label>
<input type="checkbox" id="select1" class="checkbox">
<label for="select1" class="input-label checkbox">üũ¹Ú½º2</label>
<input type="checkbox" id="select2" class="checkbox">
<label for="select2" class="input-label checkbox">üũ¹Ú½º3</label>
</div>
<div class="wrap">
<input type="radio" name="radio" id="radio0" class="checkbox">
<label for="radio0" class="input-label radio">¶óµð¿À¹öÆ°1</label>
<input type="radio" name="radio" id="radio1" class="checkbox">
<label for="radio1" class="input-label radio">¶óµð¿À¹öÆ°2</label>
<input type="radio" name="radio" id="radio2" class="checkbox">
<label for="radio2" class="input-label radio">¶óµð¿À¹öÆ°3</label>
</div>
CSS
/* µ¥¸ðÆäÀÌÁö ¼³Á¤ */
body {background:#f1f1f1;}
.wrap {padding: 20px 30px;}
/* ÀÎDz */
.checkbox[type=checkbox], .checkbox[type=radio] {display:none;}
label.input-label {
display: inline-block;
font-size: 13px;
cursor: pointer;
}
label.input-label::before {
display: inline-block;
margin:0 20px;
font-family: FontAwesome;
font-size: 20px;
color: rgba(4, 120, 193,0.2);
-webkit-transition: transform 0.2s ease-out, color 0.2s ease;
-moz-transition: transform 0.2s ease-out, color 0.2s ease;
-ms-transition: transform 0.2s ease-out, color 0.2s ease;
-o-transition: transform 0.2s ease-out, color 0.2s ease;
transition: transform 0.2s ease-out, color 0.2s ease;
-webkit-transform: scale3d(0.8,0.8,1);
-moz-transform: scale3d(0.8,0.8,1);
-ms-transform: scale3d(0.8,0.8,1);
-o-transform: scale3d(0.8,0.8,1);
transform: scale3d(0.8,0.8,1);
}
label.input-label.checkbox::before {
content: "\f0c8";
}
label.input-label.radio::before {
content: "\f111";
}
input.checkbox + label.input-label:hover::before {
-webkit-transform: scale3d(1,1,1);
-moz-transform: scale3d(1,1,1);
-ms-transform: scale3d(1,1,1);
-o-transform: scale3d(1,1,1);
transform: scale3d(1,1,1);
}
input.checkbox + label.input-label:active::before {
-webkit-transform: scale3d(1.5,1.5,1);
-moz-transform: scale3d(1.5,1.5,1);
-ms-transform: scale3d(1.5,1.5,1);
-o-transform: scale3d(1.5,1.5,1);
transform: scale3d(1.5,1.5,1);
}
input.checkbox:checked + label.input-label::before {
display: inline-block;
font-family: FontAwesome;
color:#0478c1;
-webkit-transform: scale3d(1,1,1);
-moz-transform: scale3d(1,1,1);
-ms-transform: scale3d(1,1,1);
-o-transform: scale3d(1,1,1);
transform: scale3d(1,1,1);
}
input.checkbox:checked + label.input-label.checkbox::before {
content:"\f14a";
}
input.checkbox:checked + label.input-label.radio::before {
content:"\f058";
}
¹Ýµå½Ã Å©·Ò¿¡¼ È®ÀÎÇϼ¼¿ä!! ÀͽºÇ÷η¯¿¡¼´Â Á¤»óÀûÀ¸·Î ¿¶÷ÇÒ ¼ö ¾ø½À´Ï´Ù