Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created October 10, 2012 08:45
Show Gist options
  • Select an option

  • Save gunnarbittersmann/3864174 to your computer and use it in GitHub Desktop.

Select an option

Save gunnarbittersmann/3864174 to your computer and use it in GitHub Desktop.
figcaption transition
/**
* figcaption transition
*/
figure
{
position: relative;
float: left;
}
img
{
display: block;
width: 384px;
}
figcaption
{
position: absolute;
right: 0;
bottom: 0;
left: 0;
font-weight: bold;
font-size: 1.2em;
background: rgba(255, 255, 255, 0.8);
overflow: hidden;
box-sizing: border-box;
height: 0;
padding: 0 1em;
transition: all .5s ease-in-out;
}
figure:hover figcaption
{
height: 4em;
padding: 1em 1em;
}
<figure>
<img src="//bittersmann.de/tests/testbild.png" alt=""/>
<figcaption>Testbild</figcaption>
</figure>
{"view":"separate","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