4

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!

1
  • scale and translate are the value of the same css properties I don't think its posible to seperate them. Commented Mar 23, 2012 at 17:00

1 Answer 1

11

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I honestly didn't think of that possibility. :'-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.