Created
February 26, 2013 11:38
-
-
Save tagliala/5037860 to your computer and use it in GitHub Desktop.
Pure CSS3 filled-in Radio Buttons feat. FontAwesome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.circle-radio-boxes { | |
margin-left: -10px; | |
padding-top: 5px; | |
} | |
.circle-radio-boxes input[type=radio] { | |
visibility: hidden; | |
position: absolute !important; | |
top: -9999px !important; | |
left: -9999px !important; | |
} | |
.circle-radio-boxes label { | |
display: inline-block; | |
font-family: FontAwesome; | |
margin-left: 10px; | |
} | |
.circle-radio-boxes label:before { | |
content: "\f111"; | |
} | |
.circle-radio-boxes input[type=radio]:checked ~ label:before { | |
content: "\f10c"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="circle-radio-boxes"> | |
<label for="optionsRadios1"></label> | |
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1"/> | |
<label for="optionsRadios2"></label> | |
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2" checked="checked"/> | |
<label for="optionsRadios3"></label> | |
<input type="radio" name="optionsRadios" id="optionsRadios3" value="option3"/> | |
<label for="optionsRadios4"></label> | |
<input type="radio" name="optionsRadios" id="optionsRadios4" value="option4"/> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jsfiddle.net/r5vDY/