Home » » Image with sliding description panel using CSS3 transitions

Image with sliding description panel using CSS3 transitions

This CSS example shows how to add an animated description panel to images that slides open when the mouse rolls over the image using CSS3 transitions. By wrapping the image inside a relatively positioned container alongside a newly injected description DIV to house the description itself, we can slide the later into view using CSS3's transform:translate() property. All four sliding directions are shown below (up, down, right, or left). The onset of the sliding animation is delayed by 0.5 seconds each time using the transition-delay property, so it occurs after that of the CSS3 shadow being added to the image to create the effect of a raised image. The result is a cool image with a sliding description panel that uses nothing more than HTML/ CSS to create the effect.

The following works best in a modern browser that supports CSS3 transitions, namely, IE10+, FF3.5+, Chrome/Safari, and Opera 10. Lesser browsers such as IE9 will still see the description panel onMouseover, just sans the transition:


<!-- Make sure each container contains explicit width/height attrs that reflect the dimensions of the showcased image-->look the #2

-----------


1a- Capable of seating 50,000 spectators, the Colosseum was used for gladiatorial contests and public spectacles such as executions.


2a- Capable of seating 50,000 spectators, the Colosseum was used for gladiatorial contests and public spectacles such as executions.


3a- Capable of seating 50,000 spectators, the Colosseum was used for gladiatorial contests and public spectacles such as executions.


4a- Capable of seating 50,000 spectators, the Colosseum was used for gladiatorial contests and public spectacles such as executions.
---Edit---
Social: Track Mexico Edit, Edit. Blog Beta

0 comments:

Post a Comment

 
----
Sitemap : Edit | Edit | Edit
Copyright © 2014. Beta Blog |All Rights Reserved
Blog by Edit
Blog by Edit