Created
July 3, 2014 12:31
-
-
Save joliveras/edc23e96a5970ca67beb to your computer and use it in GitHub Desktop.
CSS: Checkbox styled
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
input[type="checkbox"]{ | |
display: none; | |
} | |
input[type="checkbox"] + label:before{ | |
content: ""; | |
background-color: #fff; | |
width: 16px; | |
height: 16px; | |
display: inline-block; | |
margin: 0 0.5em 0.2em 0; | |
vertical-align: middle; | |
} | |
input[type="checkbox"]:checked + label:before{ | |
content: "\2713"; | |
line-height: 1em; | |
font-size: 1em; | |
text-align: center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment