Created
February 25, 2014 02:11
-
-
Save oksushi/9201356 to your computer and use it in GitHub Desktop.
Making a clickable Cage
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
/** | |
* Making a clickable Cage | |
*/ | |
div { | |
position: relative; | |
float: left; | |
} | |
img { | |
display: block; | |
} | |
button { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
bottom: 0; | |
display: block; | |
background: transparent; | |
border: 0; | |
cursor: pointer; | |
} | |
button span { | |
background: rgba(0,0,0,.5); | |
padding: 1em; | |
border-radius: 1em; | |
color: white; | |
} |
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> | |
<img src="http://placecage.com/200/300" alt="Cage"> | |
<button type="button" value="Zoom"><span>Zoom</span></button> | |
</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
// alert('Hello world!'); |
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","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment