Skip to content

@ziedus /dabblet.css forked from dgmid/dabblet.css
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Animated HTML5 / CSS3 image caption - Example 4
/**
* Animated HTML5 / CSS3 image caption - Example 4
*/
/* page styles */
body{
background: #fff;
min-height:100%;
}
p {
width: 300px;
margin: 0 auto;
text-align: center;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a:link, a:visited {
color: #999;
text-decoration: none;
}
a:hover, a:active {
color: #0080ff;
}
/* image caption styles */
figure {
margin: 100px auto;
width: 200px;
height: 200px;
overflow: hidden;
position: relative;
}
figcaption {
position: absolute;
display: block;
width: 150px;
left: 25px;
top: -158px;
text-align: center;
color: #fff;
background-color: rgba(142,2,49,0.8);
line-height: 150px;
font-size: 20px;
transform: rotate(60deg);
border-radius: 75px;
box-shadow: #000 0 4px 8px;
transition: top .5s ease-out, transform .5s ease-in;
}
figure:hover figcaption {
top: 25px;
transform: rotate(-30deg);
}
<body>
<figure>
<img src="http://www.midwinter-dg.com/blog_demos/css3-animated-image-captions/oxnadalur.png" width="200" height="200" alt="Öxnadalur" />
<figcaption>Öxnadalur</figcaption>
</figure>
<p>you can find more examples here:<br />
<a href="http://www.midwinter-dg.com/blog_demos/css3-animated-image-captions/" target="_blank">css3 animated image captions</a></p>
</body>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.