Flash Effect on hover image using Css3

Before this we seen lot of  css3 hover effect. Flash Effect is a another nice css3 effect, Now we can see how to use this css3 effect on hover the image. When we compare to another effect it is the better one. This animation effect will done using the simple css3 code. Below example shows the flash animation effect, here is the full css code and also provided live demo for your better understanding.


Code for create Flash Effect on hover the image using Css3:

<html>
<head>
<title>flash on hover effect with caption using css3</title>
<style>
.column {
margin: 15px 15px 0;
padding: 0;
}
.column:last-child {
padding-bottom: 60px;
}
.column::after {
content: '';
clear: both;
display: block;
}
.column div {
position: relative;
float: left;
width: 300px;
height: 200px;
margin: 0 0 0 25px;
padding: 0;
}
.column div:first-child {
margin-left: 0;
}
.column div span {
position: absolute;
bottom: -20px;
left: 0;
z-index: -1;
display: block;
width: 300px;
margin: 0;
padding: 0;
color: #444;
font-size: 18px;
text-decoration: none;
text-align: center;
-webkit-transition: .3s ease-in-out;
transition: .3s ease-in-out;
opacity: 0;
}
figure {
width: 300px;
height: 200px;
margin: 0;
padding: 0;
background: #fff;
overflow: hidden;
}
figure:hover+span {
bottom: -36px;
opacity: 1;
}

.hover13 figure:hover img {
opacity: 1;
-webkit-animation: flash 1.5s;
animation: flash 1.5s;
}
@-webkit-keyframes flash {
0% {
opacity: .4;
}
100% {
opacity: 1;
}
}
@keyframes flash {
0% {
opacity: .4;
}
100% {
opacity: 1;
}
}

</style>
</head>
<body>
<div class="hover13 column">
<div>
<figure><img src="1.jpeg" /></figure>
<span>Hover Text</span>
</div>
<div>
<figure><img src="2.jpeg"  /></figure>
<span>Hover Text</span>
</div>
<div>
<figure><img src="3.jpeg" /></figure>
<span>Hover Text</span>
</div>
<div>
<figure><img src="4.jpeg" /></figure>
<span>Hover Text</span>
</div>
</div>
</body>
</html>

Post a Comment

0 Comments