Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved my animation #2380

Merged
merged 9 commits into from
Oct 29, 2023
64 changes: 58 additions & 6 deletions Art/Ornitcg/fallingBall/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,68 @@ body {
height: 150px;
width: 150px;
background: radial-gradient(circle at 20px 20px, #FAF803, #ffffff);
border-radius: 50%;
transition: transform 3s cubic-bezier(0.98, 0.05, 0.54, 0.95)n;
border-radius: 50%;
background: radial-gradient(circle at 20px 20px, #EB3BED, #ffffff);

animation: bounce 6s infinite;

}

body:hover {
.ball {
background: radial-gradient(circle at 20px 20px, #EB3BED, #ffffff);
@keyframes bounce {
0% {
transform: translateY(0%);
animation-timing-function: ease-in;

}

15% {
transform: translateY(530%);
animation-timing-function: ease-in;

}

35%{
transform: translateY(200%);
animation-timing-function: ease-in;

}
50%{
transform: translateY(530%);
animation-timing-function: ease-in;

}
60%{
transform: translateY(350%);
animation-timing-function: ease-out;


}
70%{
transform: translateY(530%);
animation-timing-function: ease-in;

}
80%{
transform: translateY(450%);
animation-timing-function: ease-out;

}
90%{
transform: translateY(530%);
animation-timing-function: ease-in;

}
95%{
transform: translateY(500%);
animation-timing-function: ease-out;

}

}
100% {
transform: translateY(530%);
animation-timing-function: ease-in;

}

}