<div class="cp_ipcheck">
<ul>
<li class="list_item">
<input type="checkbox" class="option-input" id="d_ch1" checked />
<label for="d_ch1">ネコ</label>
</li>
<li class="list_item">
<input type="checkbox" class="option-input" id="d_ch2" />
<label for="d_ch2">イヌ</label>
</li>
<li class="list_item">
<input type="checkbox" class="option-input" id="d_ch3" />
<label for="d_ch3">ウサギ</label>
</li>
</ul>
</div>
.cp_ipcheck {
width: 90%;
margin: 2em auto;
text-align: left;
}
.cp_ipcheck ul {
margin: 0;
padding: 0;
list-style: none;
}
.cp_ipcheck .list_item {
position: relative;
}
.cp_ipcheck .list_item:hover label {
color: #da3c41;
}
.cp_ipcheck .list_item:hover label::before {
margin-right: 2em;
border: 0.4em solid #da3c41;
}
.cp_ipcheck .option-input {
display: none;
}
.cp_ipcheck .option-input:checked + label {
color: #da3c41;
}
.cp_ipcheck .option-input:checked + label::before {
margin-right: 2em;
border: 0.4em solid #da3c41;
background: #da3c41;
}
.cp_ipcheck label {
display: -webkit-box;
display: flex;
padding: 1em 0;
cursor: pointer;
-webkit-transition: all 0.25s linear;
transition: all 0.25s linear;
text-transform: uppercase;
-webkit-box-align: center;
align-items: center;
}
.cp_ipcheck label::before {
display: block;
width: 1em;
height: 1em;
margin-right: 0.625em;
content: '';
-webkit-transition: all 0.25s linear;
transition: all 0.25s linear;
border: 0.4em solid #da3c41;
}
.cp_ipcheck .option-input:disabled + label {
cursor: not-allowed;
color: #b8b7b7;
}
.cp_ipcheck .option-input:disabled + label::before {
cursor: not-allowed;
border: 0.4em solid #b8b7b7;
}