Last active
September 4, 2018 08:50
-
-
Save yuririn/a81893b0630dc388c126440dfc10c499 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* css checkbox01 */ | |
.checkbox01-input{ | |
display: none; | |
} | |
.checkbox01-parts{ | |
padding-left: 20px; | |
position:relative; | |
margin-right: 20px; | |
} | |
.checkbox01-parts::before{ | |
content: ""; | |
display: block; | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 15px; | |
height: 15px; | |
border: 1px solid #999; | |
border-radius: 4px; | |
} | |
.checkbox01-input:checked + .checkbox01-parts{ | |
color: #009a9a; | |
} | |
.checkbox01-input:checked + .checkbox01-parts::after{ | |
content: ""; | |
display: block; | |
position: absolute; | |
top: -5px; | |
left: 5px; | |
width: 7px; | |
height: 14px; | |
transform: rotate(40deg); | |
border-bottom: 3px solid #009a9a; | |
border-right: 3px solid #009a9a; | |
} | |
<!-- html --> | |
<div class="checkbox01"> | |
<label> | |
<input type="checkbox" name="checkbox01[]" class="checkbox01-input"> | |
<span class="checkbox01-parts">チェックボックス01</span> | |
</label> | |
<label> | |
<input type="checkbox" name="checkbox01[]" class="checkbox01-input"> | |
<span class="checkbox01-parts">チェックボックス02</span> | |
</label> | |
<label> | |
<input type="checkbox" name="checkbox01[]" class="checkbox01-input"> | |
<span class="checkbox01-parts">チェックボックス03</span> | |
</label> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment