This tutorial create stunning and modern CSS3 and HTML5 Animated Image Caption Hover Effects
figure
& figcaption
elements. This image caption hover effect mostly use productbased web
layouts and galley based web layouts.Features:
- Built only with CSS3 and HTML5
- Touch Devices supported
- Stunning effects using CSS3 3D Transforms
- Easy to customize via CSS and Html
- 7 different effects to fit your requirements
- Check the demo page for more details
1. HTML Markup
<figure>
<img src="images/1.png"
alt="img01">
<figcaption>
<h3>Camera</h3>
<span>Jacob Cummings</span>
<a href="http://dribbble.com/shots/1115632-Camera">Take a look</a>
</figcaption>
</figure>2. CSS
figcaption {
height: 100%;
width: 100%;
opacity: 0;
text-align: center;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
-moz-transition: -moz-transform 0.3s, opacity 0.3s;
transition: transform 0.3s, opacity 0.3s;
}
.no-touch figure:hover figcaption,
figure.cs-hover figcaption {
opacity: 1;
-webkit-transform: translate(15px, 15px);
-moz-transform: translate(15px, 15px);
-ms-transform: translate(15px, 15px);
transform: translate(15px, 15px);
}
figcaption h3 {
margin-top: 70px;
}
figcaption span {
display: block;
}
figcaption a {
margin-top: 30px;
}
3. Include this js file also need to touch devices
<script src="js/toucheffects.js"></script>
No comments :
Post a Comment