I want to chain multiple animations together and I can't see what's wrong with my code (it only plays the second animation).
I know I could have made the goingup and goingdown animations just one animation (without chaining), but I want to insert a third animation in between these two animations and having three distinct animations seemed like the best approach.
.customer-1 {
-webkit-animation: goingup 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) .5s both;
animation: goingup 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) .5s both;
-webkit-animation: goingdown 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.2s both;
animation: goingdown 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.2s both;
}
@keyframes goingup {
0% {
transform: translateY(1000px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
@-webkit-keyframes goingup {
0% {
-webkit-transform: translateY(1000px);
opacity: 0;
}
100% {
-webkit-transform: translateY(0);
opacity: 1;
}
}
@keyframes goingdown {
0% {
transform: translateY(0);
opacity: 1;
}
100% {
transform: translateY(1000px);
opacity: 0;
}
}
@-webkit-keyframes goingdown {
0% {
-webkit-transform: translateY(0);
opacity: 1;
}
100% {
-webkit-transform: translateY(1000px);
opacity: 0;
}
}
<div class="customer-1">
div content
</div>