Skip to content

Instantly share code, notes, and snippets.

@oksushi
Created February 25, 2014 02:11
Show Gist options
  • Save oksushi/9201356 to your computer and use it in GitHub Desktop.
Save oksushi/9201356 to your computer and use it in GitHub Desktop.
Making a clickable Cage
/**
* 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;
}
<div>
<img src="http://placecage.com/200/300" alt="Cage">
<button type="button" value="Zoom"><span>Zoom</span></button>
</div>
// alert('Hello world!');
{"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