Skip to content

Instantly share code, notes, and snippets.

@rkJun
Created December 29, 2012 18:39
Show Gist options
  • Save rkJun/4408607 to your computer and use it in GitHub Desktop.
Save rkJun/4408607 to your computer and use it in GitHub Desktop.
A CodePen by Juntai Park. CSS image caption 06
<center><div class="box">
<div class="rotate">
<img src="http://25.media.tumblr.com/avatar_1a0f9b8a64c3_128.png" width="200"/>
<span class="caption">
<p class="nick">
@rkJun [알케이준]</p>
<p class="bio">
Freelance Web Developer, Student, 세벌식 사용자, undefine:D organizer, OKJSP committer, MPlayer X Korean Localization, Macbook Pro, iPhone 4S, iPad mini, One Piece ...<br/>
</p>
</span>
</div></div></center>
.box {
border: 5px solid #fff;
cursor: pointer;
margin: 5px;
position: relative;
overflow: hidden;
width: 200px;
height: 200px;
text-align: center;
-webkit-box-shadow: 0px 0px 1px 1px #ccc;
-moz-box-shadow: 0px 0px 1px 1px #ccc;
box-shadow: 0px 0px 1px 1px #ccc;
}
.box img {
position: absolute;
left: 0;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
.box .caption {
background-color: rgba(0,0,0,0.8);
position: absolute;
color: #fff;
z-index: 100;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
left: 0;
width: 170px;
height: 170px;
text-align: left;
padding: 15px;
top: 200px;
-moz-transform: rotate(-180deg);
-o-transform: rotate(-180deg);
-webkit-transform: rotate(-180deg);
transform: rotate(-180deg);
}
.box .rotate {
width: 200px;
height: 400px;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
.box:hover .rotate {
background-color: rgba(0,0,0,1) !important;
-moz-transform: rotate(-180deg);
-o-transform: rotate(-180deg);
-webkit-transform: rotate(-180deg);
transform: rotate(-180deg);
}
.box .caption .nick {
font: 12pt monaco, normal Arial, sans-serif;
}
.box .caption .bio {
font: 9pt monaco, normal Arial, sans-serif;
font-smoothing: antialiased;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment