<div class="cp_ipcheck12">
<label><input type="checkbox" name="cpipr12">ネコ</label>
<label><input type="checkbox" name="cpipr12">イヌ</label>
<label><input type="checkbox" name="cpipr12">ウサギ</label>
</div>
.cp_ipcheck12 {
margin: 6em 2em;
}
.cp_ipcheck12 label {
display: flex;
align-items: center;
cursor: pointer;
}
/*通常時のチェックボックスの設定*/
.cp_ipcheck12 input[type="checkbox"] {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border: 2px solid #666666;
cursor: pointer;
transition: .5s ease;
/*デフォルト値を無効に*/
appearance: none;
outline: none;
}
.cp_ipcheck12 input[type="checkbox"]:after {
position: absolute;
content: '';
transform-origin: center center;
transition: .5s ease;
opacity: 0;
}
/*checked時の設定*/
.cp_ipcheck12 input[type="checkbox"]:checked {
border-radius: 100%;
background-color: #da3c41;
border: 2px solid #da3c41;
}
.cp_ipcheck12 input[type="checkbox"]:checked:after {
content: '✔︎';
color: #ffffff;
opacity: 1;
transform: scale(1, 1);
transition: opacity .5s ease;
}