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/ae6e823e1dfc2718677e0484fbc9493a to your computer and use it in GitHub Desktop.
Save yuririn/ae6e823e1dfc2718677e0484fbc9493a to your computer and use it in GitHub Desktop.
/*css radio02*/
.radio02-input{
display: none;
}
.radio02-input + label{
padding-left: 20px;
position:relative;
margin-right: 20px;
}
.radio02-input + label::before{
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
width: 15px;
height: 15px;
border: 1px solid #999;
border-radius: 50%;
}
.radio02-input:checked + label{
color: #009a9a;
}
.radio02-input:checked + label::after{
content: "";
display: block;
position: absolute;
top: 3px;
left: 3px;
width: 11px;
height: 11px;
background: #009a9a;
border-radius: 50%;
}
<!-- html -->
<div class="radio02">
<input type="radio" name="radio02" class="radio02-input" id="radio02-01">
<label for="radio02-01">ラジオ01</label>
<input type="radio" name="radio02" class="radio02-input" id="radio02-02">
<label for="radio02-02">ラジオ02</label>
<input type="radio" name="radio02" class="radio02-input" id="radio02-03">
<label for="radio02-03">ラジオ03</label>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment