I have three elements, Each of them with its own transform, and I want to animate their translate transform not affecting scale:
.one{
-webkit-transform: scale(0.5);
}
.two{
-webkit-transform: scale(0.8);
}
.three{
-webkit-transform: scale(0.2);
}
@-webkit-keyframes bounce{
from{
-webkit-transform: translate3d(0, 0, 0);
}
to{
-webkit-transform: translate3d(100px, 100px, 0);
}
}
<div class="one">test1</div>
<div class="two">test2</div>
<div class="three">test3</div>
But this transform overrides scale. I could use different keyframes for each element. Or wrap each element and style its parent with scale transform and use one only keyframes to animate it. But this all is kind of tricky. Is there a better solution?