This is not a complete solution to your Question, but you asked how I can define pathcss in the animation, so you can:
JSFIDDLE
div.ball {
background : green;
width:20px; height:20px;
border-radius:50%;
-webkit-animation: myOrbit 4s linear infinite;
animation: myOrbit 4s linear infinite;
}
@keyframes path {
0% { transform: translateX(10px) }
10% { transform: translateX(0px) translateY(20px)}
20% { transform: translateX(20px) translateY(40px)}
30% { transform: translateX(50px) translateY(52px)}
40% { transform: translateX(150px) translateY(50px)}
}
If you see in the code, you actually define the path for moving the ball as X, Y
source
share