Created
December 28, 2011 12:28
-
-
Save mortendk/1527788 to your computer and use it in GitHub Desktop.
css input checkbox
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
input[type=checkbox]{ | |
position: absolute; | |
top: -9999px; | |
left: -9999px; | |
} | |
input[type=checkbox] ~ label { background:red;} | |
input[type=checkbox] ~ label { | |
text-indent: -999em; | |
border:1px solid green; | |
overflow:hidden; | |
display:block | |
width:120px | |
} | |
input[type=checkbox]:checked ~ label { background:green;} | |
input[type=checkbox] ~ label:after { content:"kiss me";} | |
input[type=checkbox]:checked ~ label:after { content:"hug me";} | |
label{ | |
text-indent:-999em; | |
background:pink; | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<div class="form-item form-type-radio"> | |
<input type="checkbox" id="edit-field-pt-boolean-checkbox-one-und-0" value="0" name="foo"> | |
<label for="edit-field-pt-boolean-checkbox-one-und-0">lick me</label> | |
</div> | |
</div> | |
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
{"view":"split-vertical","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment