Having some trouble creating smooth animations using CSS3.
Take a look at my demo here: http://jsfiddle.net/fyanz92/m98jy/2/
Here are the snippets from my code:
.loading {
width: 250px;
height: 50px;
background: #CEE7D3;
margin: auto;
z-index: 1005;
top: -3px;
padding: 15px;
border-radius: 0px 0px 5px 5px;
margin-top: -2px;
border: 1px solid #73AD7F;
box-shadow: 0px -2px 6px -4px #000 inset;
}
.mobil {
position:absolute;
-webkit-animation: gerakmobil 5s;
animation: gerakmobil 2s infinite;
}
@-webkit-keyframes gerakmobil {
0 % {
top:0px;
left:-50px;
png-shadow:5px 5px 5px #222;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222)
}
25 % {
top:0px;
left:30px;
png-shadow:5px 5px 5px #222;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222)
}
50 % {
top:0px;
left:100px;
png-shadow:5px 5px 5px #222;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222)
}
75% {
top:0px;
left:100px;
png-shadow:5px 5px 5px #222;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222)
}
100 % {
top:0px;
left:300px;
png-shadow:5px 5px 5px #222;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222)
}
}
However, I'm not satisfied with how choppy and rigid the animation looks. My goal is to create a car animation that smoothly enters from the left side, moves towards the right, pauses briefly in the middle, and then repeats infinitely.