Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i use transform as a value of transition-property?

Can i use transform as a value of transition-property?

transition-property: transform;

W3C transition standard doesn't list transform as Animatable value.

In fact W3C transform standard has missing row for Animatable:Yes/No in the table of 7. The ‘transform’ Property.

I am worried this is legal or not.

This stackoverflow answer suggest to use transform as the value of transition-property.

I can get the transform animation using 0% and 100% keyframe but if only 2 states are involved, I would prefer transition instead of animation.

like image 667
P K Avatar asked Nov 12 '22 02:11

P K


1 Answers

You must specify the exact name for each engine. So for example, for Safari and Chrome, you should write the following:

-webkit-transition-property: -webkit-transform;

Here is the working example in JSFiddle.
Note: I've used the shorthand for transform property.

like image 164
Karlen Kishmiryan Avatar answered Dec 17 '22 23:12

Karlen Kishmiryan