Moving an image using css animation effect will make website as more attractive. Here is the tutorial for moving image effect using css3 animation.
animation: animation-name | animation-duration | animation-iteration-count
animation-name – animation name, we have to define property of this animation name
animation-duration – speed of the effect
animation-iteration-count – Number of times the animation will works.
[code type=html]
<html>
<head>
<link rel=”stylesheet” type=”text/css” href=”style.css”>
</head>
<body>
<div class=”bg”></div>
</body>
</html>
[/code]
style.css
[code type=css]
.bg
{
-webkit-animation: move 30s infinite;
-moz-animation: move 30s infinite;
-ms-animation: move 30s infinite;
-o-animation: move 30s infinite;
animation: move 1s infinite;
background: url(image/bg.png);
height: 190px;
margin: -8px;
}
@-ms-keyframes move {
from {background-position:0% 0%;}
to {background-position:100% 100%;}
}
@-moz-keyframes move {
from {background-position:0% 0%;}
to {background-position:100% 100%;}
}
@-webkit-keyframes move {
from {background-position:0% 0%;}
to {background-position:100% 100%;}
}
@keyframes move {
from {background-position:0% 0%;}
to {background-position:100% 100%;}
}
[/code]
Nice and helpful tutorial for beginners.