Jump to content
Search Community

When fading out an element, then fading back in with a rotationY, the animated element's back is not visible until animation is finished

szasz test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

 

I'm using the GSAP to animate some elements. There seems to be a bug when fading an element out using opacity:0, or autoAlpha:0, then fading them back in with the same properties plus a rotationY: 180.

The element rotates, but only it's front is visible, when the animation completes, the backside pops in replacing the front.

When not using autoAlpha the element's sides are showing as expected.

 

Any ideas why is this happening and how to solve it?

See the Pen WNaoRaZ by hazyswim (@hazyswim) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @szasz welcome to the forum!

 

I have no idea why that wouldn't work. I've wrapped your .box in another element and tweened the opacity of that element and that does work. So that could be a quick fix. Maybe it is something that browsers can't handle?

 

See the Pen Rweopdx?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

 

I've created an even more simple minimal demo maybe someone else will shed some light on this issue. 

 

See the Pen abRBJrm?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

  • Thanks 1
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...