Just move the transform-origin
from the eat
animation to the .face1
.
So, your animation should look like:
@-webkit-keyframes eat {
0% {
-webkit-transform: rotate(-7deg);
}
100% {
-webkit-transform: rotate(4deg);
}
}
and define the different transform-origin
on the each .face1
and .face2
.
.face1 {
-webkit-transform-origin: bottom left;
transform-origin: bottom left;
}
.face2 {
-webkit-transform-origin: bottom right;
transform-origin: bottom right;
}
(having fun) If you want both faces synchronized, just add a 0.5s animation start delay on the second face. That looks better to me http://jsfiddle.net/nbLhT/8/
.face2 {
animation: eat .5s ease-in-out infinite alternate both .5s;
-webkit-animation: eat .5s ease-in-out infinite alternate both .5s;
}
(I've added the .5s at the end)