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

Tools:

Crypto Currency

PHPKIDA provides free online the best real-time crypto market price, news, predictions, index with graphs & historical data for 2000+ coins including bitcoin, ethereum, & altcoins from major cryptocurrency exchanges.

Visite Tool

Icon Generator

PHPKIDA provides free online icon generator. Our icon generator help you to edit, modify, resize and customize icon for your website and applications. Convert to a shap you like add icon border, you can change icon border color, border size, background color, icon shadow, icons color, icon size in your own way and save it as a png image.

Visite Tool

Youtube Video Downloader

PHPKIDA provides Free online YouTube video downloader to download YouTube videos quickly in MP4, 3GP, and more. Search your video and free fast download youtube videos.

Visite Tool

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.