Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS3 transition scale but not translation

I couldn't find an answer to this anywhere, probably because it doesn't exist, but anyway:

Rather than defining "transition-property: transform", is it possible to define transitions for translation and scale independently?

Right now I got the following definition:

.logo {
    position: absolute;
    -webkit-transition: -webkit-transform 1s ease-out;
}

This way, when I set "-webkit-transform" to "scale($s) translate3D($x,$y,$z)" (with $s etc. being arbitrary values) both are animated, but I only want the scale to be...

Thanks for any hints in advance!

like image 264
Bunkerbewohner Avatar asked Sep 06 '25 03:09

Bunkerbewohner


1 Answers

The hacky way to solve this is to use a wrapper element and put the translate on that element.

like image 175
Michael Mullany Avatar answered Sep 07 '25 16:09

Michael Mullany