Created
October 7, 2012 05:26
-
-
Save hemantajax/3847198 to your computer and use it in GitHub Desktop.
click with css3
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
<!doctype html> | |
<html> | |
<head> | |
<title>click wit css3</title> | |
<meta charset="utf-8" /> | |
<style> | |
#wrapper{ | |
width: 600px; | |
margin: 20px auto; | |
} | |
.clickable label { | |
cursor: pointer; | |
border-bottom: 1px solid #000; | |
font-family: Arial, sans-serif; | |
} | |
.clickable .appear { | |
display: none; | |
font-family: Arial, sans-serif; | |
background: black; | |
color: #fff; | |
padding: 10px; | |
} | |
.clickable input { | |
display: none; | |
} | |
.clickable input:checked ~ .appear { | |
display: block; | |
} | |
</style> | |
</head> | |
<body> | |
<div id='wrapper'> | |
<form class="clickable"> | |
<label for="the-checkbox">Click Me!</label> | |
<input type="checkbox" id="the-checkbox" /> | |
<div class="appear">Some text to appear</div> | |
</form> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment