Answer the question
In order to leave comments, you need to log in
Animation delay / sequencing across multiple @keyframes?
There are two animations that I want to run in sequence, not at the same time, how do I do that?
.cd-add{
animation: translate 1s linear forwards,
opacity 1s linear forwards;
}
@keyframes translate{
0%{
transform: translate(0, 0);
}
100%{
transform: translate(0, 100px);
}
}
@keyframes opacity{
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
Answer the question
In order to leave comments, you need to log in
.cd-add{
animation: translate-opacity 1s linear forwards;
}
@keyframes translate-opacity{
0%{
transform: translate(0, 0);
opacity: 0;
}
50%{
transform: translate(0, 100px);
opacity: 0;
}
100%{
opacity: 1;
transform: translate(0, 100px);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question