One image to another with a timer CSS3 animation

One image to another with a timer CSS3 animation

Here we are creating auto changing images after particular time. Changing one image to another with a particular time CSS animations.First of take two images set absolutely positioned on top of each other.Use CSS key-frames to define two states, one with top image transparent, one with it opaque.Set the animations number of iterations to infinite for auto changing images one by one.
Html Code Here

<html>
<head>
<title>One image to another with a timer CSS3 animation</title>
</head>
<body>
<div id="cf">  
<img class="bottom" src="http://phpkida.com/phpkida1.png" />  
<img class="top" src="http://phpkida.com/phpkida2.png" />
</div>
</body>
</html>

CSS Code Here

<style>
#lfb 
{  
position:relative;  
height:281px;  
width:450px;  
margin:0 auto;
}
#lfb img 
{  
width:600px;  
height:300px;  
position:absolute;  
left:0;  
-webkit-transition: opacity 1s ease-in-out;  
-moz-transition: opacity 1s ease-in-out;  
-o-transition: opacity 1s ease-in-out;  
transition: opacity 1s ease-in-out;
}
@keyframes lfb3FadeInOut 
{  
0% {  opacity:1;}
45% {opacity:1;}
55% {opacity:0;}
100% {opacity:0;}}

#lfb img.top 
{
animation-name:lfb3FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 5s;
animation-direction: alternate;
}
</style>

Click on given link and download Source Code of This Tutorial

Download source code of One image to another with a timer CSS3 animation

I hope you like this tutorial. Share with your friends.

Leave a Reply

Related Posts: You may like

Rotating Words with CSS Animations

Pure CSS Loader and spinners animation

Pure css drop down menu

Pure css dropdown navigation bar

PHPKIDA Offering Free Tools:

INSTA DOWNLOADER

Download Instagram Videos & Photos.

Download Now

CURRENCY CONVERTER

Real Time Currency Converter

Convert Now

ROBOST.TXT GEN.

Robots.txt File Creater

Create Now

HTML MINIFIER

Compress yout HTML Code

Minify Now

CSS MINIFIER

Compress yout CSS Code

Minify Now

JAVASCRIPT MINIFIER

Compress yout JavaScript Code

Minify Now

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.