GSAP icon indicating copy to clipboard operation
GSAP copied to clipboard

Animating x with percentage gets set to px

Open electrichead opened this issue 13 years ago • 1 comments

I posted this in the green sock forums, but am cross-posting here. I want to do a "slide animation" on two absolutely positioned elements simultaneously, so I set this as the css prop for the animation: { x: '-100%', z:1 } What I actually see in the inspector is this: -webkit-transform: translate3d(-100px, 0px, 1px); (I am using Chrome)

The % gets changed to px. Is there a way to preserve this?

electrichead avatar Aug 14 '13 19:08 electrichead

Please see reply here: http://forums.greensock.com/topic/8148-animating-x-with-percentage/#entry31406

%-based translation isn't currently supported.

jackdoyle avatar Aug 19 '13 08:08 jackdoyle