Skip to content

Instantly share code, notes, and snippets.

@yuririn
Last active June 9, 2017 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuririn/eab02188bdbc775e21290fed8d814731 to your computer and use it in GitHub Desktop.
Save yuririn/eab02188bdbc775e21290fed8d814731 to your computer and use it in GitHub Desktop.
/*radio01 css*/
.radio01-input{
display: none;
}
.radio01-parts{
padding-left: 20px;
position:relative;
margin-right: 20px;
}
.radio01-parts::before{
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
width: 15px;
height: 15px;
border: 1px solid #999;
border-radius: 50%;
}
.radio01-input:checked + .radio01-parts{
color: #009a9a;
}
.radio01-input:checked + .radio01-parts::after{
content: "";
display: block;
position: absolute;
top: 3px;
left: 3px;
width: 11px;
height: 11px;
background: #009a9a;
border-radius: 50%;
}
<!--html-->
<div class="radio02">
<label>
<input type="radio" name="radio01" class="radio01-input">
<span class="radio01-parts">ラジオ01</span>
</label>
<label>
<input type="radio" name="radio01" class="radio01-input">
<span class="radio01-parts">ラジオ02</span>
</label>
<label>
<input type="radio" name="radio01" class="radio01-input">
<span class="radio01-parts">ラジオ03</span>
</label>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment