Skip to content

Instantly share code, notes, and snippets.

@blackrobot
Created May 23, 2012 18:20
Show Gist options
  • Save blackrobot/2776810 to your computer and use it in GitHub Desktop.
Save blackrobot/2776810 to your computer and use it in GitHub Desktop.
Songs HTML/CSS
<style type="text/css">
/* CSS */
.team-member a {
display:block; left:0; position:absolute; top:0;
}
.team-member a span {
display:block; left:0; position:absolute; top:100%;
/* Make it so that even with padding or margin, the width is still 100% of
* the parent
*/
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
/* This should allow the element to transition on its hover state.
*/
-webkit-transition:top .25s ease-in;
-moz-transition:top .25s ease-in;
-ms-transition:top .25s ease-in;
-o-transition:top .25s ease-in;
transition:top .25s ease-in;
}
.team-member a:hover span {
/* Finally the actual hover state.
*/
top:0;
}
</style>
<div class="grid_4">
<div class="block team-member">
<article>
<a href="/Team/9" style="background-image:url(http://web1.songspub.com:8080/content/songspub/employee/Adam-Headshot.jpg);">
<span class="employee-info" style="background-image:url(http://web1.songspub.com:8080/content/songspub/employee/Adam-Personal.jpg);">Adam Ferrari<br>Royalties Analyst</span>
</a>
</article>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment