<div class="cp_ipcheck07">
<ul>
<li class="list_item">
<label><input type="checkbox" class="option-input07" checked />ネコ</label>
</li>
<li class="list_item">
<label><input type="checkbox" class="option-input07" />イヌ</label>
</li>
<li class="list_item">
<label><input type="checkbox" class="option-input07" />ウサギ</label>
</li>
</ul>
</div>
.cp_ipcheck07 {
margin: 2em auto;
}
.cp_ipcheck07 ul {
list-style: none;
}
.cp_ipcheck07 .list_item {
margin-bottom: 10px;
}
/*ラベルの設定*/
.cp_ipcheck07 label {
position: relative;
display: flex;
align-items: center;
cursor: pointer;
}
/*チェックボックスの設定*/
.cp_ipcheck07 .option-input07 {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 22px;
/*デフォルト値を無効に*/
border: none;
outline: none;
appearance: none;
}
.cp_ipcheck07 .option-input07:before,
.cp_ipcheck07 .option-input07:after {
position: absolute;
content: '';
width: 20px;
height: 20px;
}
.cp_ipcheck07 .option-input07:before {
background: #ffffff;
}
.cp_ipcheck07 .option-input07:after {
outline: 2px solid #da3c41;
transition: all 0.3s ease-in-out;
}
/*checked時の設定*/
.cp_ipcheck07 .option-input07:checked:after {
background: #da3c41;
transform: rotateY(180deg);
}