Skip to content

Instantly share code, notes, and snippets.

@michaeltwofish
Last active December 15, 2015 01:29
Show Gist options
  • Save michaeltwofish/5180104 to your computer and use it in GitHub Desktop.
Save michaeltwofish/5180104 to your computer and use it in GitHub Desktop.
tiger in the snow (HTML5)
/**
* tiger in the snow (HTML5)
*/
figure {
min-width: 178px;
/** outline: solid 1px red; /* uncomment rule to see figure outline */
position: relative;
opacity: 1.0;
}
figure:hover {
opacity: 0.8;
}
img {
max-width: 100%;
}
figcaption {
bottom: 5px;
left: 0;
right: 0;
margin: 0;
padding: 8px;
position: absolute;
background: rgba(0,0,0,.56);
color: white;
font-family: Helvetica;
font-size: 14px;
}
figcaption h4 {
margin: 0 0 8px;
padding: 0 0 5px;
border-bottom: solid 1px black;
box-shadow: 0 1px 0 0 rgba(255,255,255,.35);
font-size: 17px;
}
figcaption p {
margin: 0;
line-height: 1.25;
}
<!-- content to be placed inside <body>…</body> -->
<figure>
<a href="#"><img src="http://tiger.information-and-facts.com/wp-content/uploads/2011/07/tiger_10.jpg"></a>
<figcaption><h4>Tiger in the snow</h4><p>The tiger is the largest wild cat and is also the largest predator on land behind the Kodiak bear and the polar bear.</figcaption>
</figure>
{"view":"split-vertical","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment