Skip to content

Instantly share code, notes, and snippets.

@andrewdh
Created September 20, 2012 23:27
Show Gist options
  • Save andrewdh/3758946 to your computer and use it in GitHub Desktop.
Save andrewdh/3758946 to your computer and use it in GitHub Desktop.
Expanding Title
/**
* Expanding Title
*/
a {
text-decoration: none;
background-color: #000;
float: left;
position: relative;
overflow :hidden;
}
img {
opacity: 0.5;
display: block;
transition: all .8s ease;
}
a h2 {
font-family: serif;
font-size: 1.3rem;
line-height: 1;
letter-spacing: 0.13em;
text-transform: uppercase;
font-weight: 400;
text-align: center;
width: 100%;
margin: 0 0 -1.75rem;
padding: 1.1rem 0;
position: absolute;
bottom: 50%;
background-color: hsla(0,0%,3%,.9);
color: hsla(0,0%,85%,1);
transition: all 1.2s ease;
}
a:hover img {
opacity: 1;
}
a:hover h2 {
transform: scale(50);
opacity: 0;
}
<a href="#">
<img src="http://lorempixel.com/300/400/abstract/10"/>
<h2>Item Title</h2>
</a>
{"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