<div class="cp_ipcheck05">
<ul>
<li class="list_item">
<label><input type="checkbox" class="option-input05" checked />ネコ</label>
</li>
<li class="list_item">
<label><input type="checkbox" class="option-input05" />イヌ</label>
</li>
<li class="list_item">
<label><input type="checkbox" class="option-input05" />ウサギ</label>
</li>
</ul>
</div>
.cp_ipcheck05 {
width: 90%;
margin: 2em auto;
}
.cp_ipcheck05 ul {
list-style: none;
}
.cp_ipcheck05 .list_item {
margin-bottom: 10px;
}
/*ラベルの設定*/
.cp_ipcheck05 label {
position: relative;
display: flex;
align-items: center;
cursor: pointer;
}
/*チェックボックスの設定*/
.cp_ipcheck05 .option-input05 {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 22px;
/*デフォルト値を無効に*/
border: none;
outline: none;
appearance: none;
}
.cp_ipcheck05 .option-input05::before,
.cp_ipcheck05 .option-input05::after {
position: absolute;
content: '';
cursor: pointer;
}
.cp_ipcheck05 .option-input05::before {
width: 15px;
height: 15px;
background: #da3c41;
clip-path: polygon(0 70%, 5% 60%, 45% 75%, 90% 10%, 100% 20%, 50% 100%);
transform: scale(0, 0);
transition: all 0.4s cubic-bezier(0.45, 1.8, 0.5, 0.75);/*ぴょこんの動き*/
z-index: 1;
}
.cp_ipcheck05 .option-input05::after {
width: 20px;
height: 20px;
background: #ffffff;
border: 2px solid #f2f2f2;
}
/*checked時の設定*/
.cp_ipcheck05 .option-input05:checked::before {
transform: scale(1, 1);
}