I'm trying to create an animation with many steps.
I want a different value of transition for each change of style state.
However, using transition
inside @keyframes
has no effect.
.square {
background-color: #333;
height: 100px;
width: 100px;
animation: 4s move infinite;
}
@keyframes move {
0% {
transition: ease-in;
}
50% {
transform: translate(100%);
transition: ease-out;
} 100% {
transform: translate(0);
transition: cubic-bezier(0.25, 0.1, 0.6, 1.8);
}
}
<div class="square"></div>
I wonder if there is a way to have different transitions for each stage of an animation without having to combine multiple animation
in wrapped elements.