Created
December 17, 2013 19:07
-
-
Save exarcheia-web/8010781 to your computer and use it in GitHub Desktop.
Checkbox hack
This file contains hidden or 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
| /* Checkbox hack */ | |
| .click-me { | |
| background: gainsboro; | |
| padding: 15px 20px; | |
| display: block; | |
| width: 80px; | |
| text-align: center; | |
| margin: 10px auto; | |
| } | |
| .click-me:hover { | |
| cursor: pointer; | |
| background: hotpink; | |
| } | |
| .change-me { | |
| background: aliceblue; | |
| border: 1px solid black; | |
| color: navy; | |
| width: 120px; | |
| height: 120px; | |
| line-height: 120px; | |
| border-radius: 50%; | |
| text-align: center; | |
| margin: auto; | |
| transition: .4s all; | |
| } | |
| /* hide the input */ | |
| #checkbox { | |
| position: absolute; | |
| top: -9999em; | |
| left: -9999em; | |
| } | |
| #checkbox:checked ~ .change-me { | |
| box-shadow: 0 0 18px navy; | |
| } |
This file contains hidden or 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
| <label for="checkbox" class="click-me">Click me</label> | |
| <input type="checkbox" id="checkbox"> | |
| <div class="change-me">Change me</div> |
This file contains hidden or 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
| // alert('Hello world!'); |
This file contains hidden or 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","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment