Jump to content
Search Community

Internal "default" sequence?

NubieHere test
Moderator Tag

Recommended Posts

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

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

  • Like 3
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...