When you scale the css3 element, what transition properties change?

Which css transition property is really used when you use the css property:

 .selector { transform: scale(n); } 

I am trying to isolate which values ​​really change when I scale something using CSS. It works, but it also animates everything I don't want to do. I only want to animate the height / width of the object:

 .selector { transition: all 0.3s linear; } 

Instead of "everything", I tried setting the width of the width, but it does not smoothly animate. He simply becomes attached to the final position.

+6
source share
1 answer

You can use transform

 transition: transform 200ms linear; 

You need vendor prefixes that are also so similar to

 -webkit-transition: -webkit-transform 200ms linear; 

I did not fully understand your question, but I assume that you just want to animate the scale and nothing more in this element, if so, then this is what you need.

+7
source

Source: https://habr.com/ru/post/950295/


All Articles