<div class="cp_ipradio05">
<ul>
<li class="list_item">
<label><input type="radio" class="option-input" name="cpipr05" checked>ネコ</label>
</li>
<li class="list_item">
<label><input type="radio" class="option-input" name="cpipr05">イヌ</label>
</li>
<li class="list_item">
<label><input type="radio" class="option-input" name="cpipr05">ウサギ</label>
</li>
</ul>
</div>
.cp_ipradio05 {
margin: 2em auto;
}
.cp_ipradio05 ul {
list-style: none;
}
.cp_ipradio05 .list_item {
margin-bottom: 10px;
}
/*ラベルの設定*/
.cp_ipradio05 label {
position: relative;
display: flex;
align-items: center;
cursor: pointer;
}
/*ラジオボタンの設定*/
.cp_ipradio05 .option-input {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 22px;
/*デフォルト値を無効に*/
border: none;
outline: none;
appearance: none;
}
.cp_ipradio05 .option-input:before,
.cp_ipradio05 .option-input:after {
position: absolute;
content: '';
border-radius: 50%;
}
.cp_ipradio05 .option-input:before {
width: 20px;
height: 20px;
background: #ffffff;
border: 2px solid #e5e5e5;
}
.cp_ipradio05 .option-input:after {
display: block;
width: 16px;
height: 16px;
background: #da3c41;
transition: transform 0.4s cubic-bezier(0.45, 1.8, 0.5, 0.75);/*ぴょこんの動き*/
transform: scale(0, 0);
}
/*checked時の設定*/
.cp_ipradio05 .option-input:checked:after {
transform: scale(1, 1);
}