I have this scenario to animate a ball along a curved path. I don't have any idea to implement this using the css3
. I know there is no path
animation kind of stuff.
Is there a way to animate a ball on a curved background.
here is Live Demo
my code :
div.path {
background:url(https://dl.dropboxusercontent.com/u/10268257/images/path.png) no-repeat center bottom;
width:397px;
height:66px;
position: relative;
}
div.ball {
background : green;
width:20px; height:20px;
border-radius:50%;
}
<div class="container">
<div class="path">
<div class="ball"></div>
</div>
</div>
This is not a complete solution to your Question, but you asked for how can I define a
path
in css animation, so this is how you can:JSFIDDLE
If you see at the code you are actually defining the path for the ball to move as X,Y