I am trying to move an image along a parabolic(25% percent of a circle) path, can someone help in doing so.. I have tried to use csstransform: rotate(18deg) translate(0px,100px)
multiple times to move it around my exact code was as following -
*{
margin: 0;
padding: 0;
}
.dash{
position: absolute;
top: 70%;
left: 40%;
width:50px;
height:50px;
background: #000;
animation: animate 5s linear infinite;
transform-origin: top;
}
@keyframes animate{
0%{
transform: rotate(0deg) translate(0px , 0px);
}
10%{
transform: rotate(-5deg) translate(0px,-50px);
}
20%{
transform: rotate(-15deg) translate(0px,-100px);
}
40%{
transform: rotate(-20deg) translate(0px,-150px);
}
60%{
transform: rotate(-30deg) translate(0px,-200px);
}
80%{
transform: rotate(-35deg) translate(0px,-250px);
}
100%{
transform: rotate(0deg) translate(0px,-300px);
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<div class="dash"></div>
</body>
</html>
Inside that div i have an image.. TO SPECIFY THE PATH SEE THIS IMAGE.. Please help me..Any help will be appreciated