I'd like to animate the rotation of one coordinate with the ease
function, and another with linear
- is there a way to do that? At the moment, only one of the animations get applied, as the transform
of one animation overrides the other.
.square {
width: 100px;
height: 100px;
background: black;
animation: downward 4s ease infinite, sideward 4s linear infinite;
}
@keyframes downward {
0% {
transform: rotateX(0deg);
}
100% {
transform: rotateX(-180deg);
}
}
@keyframes sideward {
0% {
transform: rotateY(0deg);
}
100% {
transform: rotateY(-360deg);
}
}
<div class="square" />