Animate different classes on the same keyframe

Viewed 37

Is there any way to animate several classes in a same keyframe. I am trying to do some skeletal animation, and my idea is to use animation on the parent class, and inside the keyframe animate the different parts. Something like this:

.root{
animate: anim 10s infinite;
}
@keyframe anim {
from{
.body{translate: 10% 10%}
.head{translate: 5% -5%}
}
to{
.body{translate: -5% 10%;
.head{translate: 10% 0;
}
}

This is just an example, I need to use many more parts, and swap between different animations. There is anyway to achive something like this or there is some kind of library that could help?

0 Answers
Related