NubieHere Posted January 21, 2020 Share Posted January 21, 2020 Hi, Why is this (see codepen) first animating the element to the top and the left, and THEN animating the width and height!? I would EXPECT it to animate ALL properties at the same time ... as I guess any user would. So, WHY is it behaving as it does, and what would be the argument that it indeed should behave like this? It seems counter intuitive ... at best. See the Pen PowXZrB by blaasvaer (@blaasvaer) on CodePen Link to comment Share on other sites More sharing options...
Carl Posted January 21, 2020 Share Posted January 21, 2020 cool demo. the issue is that you have a css transition on .element which is fighting with gsap. .element { position: relative; z-index: 0; transition: width 2s, height 2s; // no good text-align: center; // opacity: .2; } remove the transition and it works as expected 3 Link to comment Share on other sites More sharing options...
NubieHere Posted January 21, 2020 Author Share Posted January 21, 2020 Thanks for clearing that out Carl. Lesson learned: whenever GSAP 'misbehave', check your own CSS ; ) 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now