<div class="c-block-input">
<div class="c-block-input__items">
<div class="c-block-input__title">ラジオボタン
</div>
<div class="c-block-input__radio">
<input type="radio" name="ラジオボタン" id="radio01" checked>
<label for="radio01">選択肢1</label>
</div>
<div class="c-block-input__radio">
<input type="radio" name="ラジオボタン" id="radio02">
<label for="radio02">選択肢2</label>
</div>
<div class="c-block-input__radio">
<input type="radio" name="ラジオボタン" id="radio03">
<label for="radio03">選択肢3</label>
</div>
</div>
</div>
.c-block-input__items {
margin-bottom: 32px
}
.c-block-input__title {
font-size: 16px;
font-weight: 700;
margin-bottom: 10px;
display: block
}
.c-block-input__radio input[type="radio"] {
display: none
}
.c-block-input__radio label {
box-sizing: border-box;
cursor: pointer;
display: inline-block;
padding: 3px 0 3px 26px;
position: relative;
width: auto
}
.c-block-input__radio label::before {
content: "";
display: block;
border: 1px solid #999;
border-radius: 1000px;
width: 16px;
height: 16px;
position: absolute;
left: 0;
top: 50%;
margin-top: -8px
}
.c-block-input__radio label::after {
content: "";
display: block;
background: #E6A54D;
border-radius: 1000px;
width: 10px;
height: 10px;
opacity: 0;
position: absolute;
left: 4px;
top: 50%;
margin-top: -4px
}
.c-block-input__radio input[type=radio]:checked+label::after {
opacity: 1
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.