You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have this weird transition bug when using the fade transition. The fade transition works as expected on all images except the last one. When the last image should be fading to the first image, the fading is failing. There is a flash instead of a smooth fade.
I encountered this on a website I'm building, and it took me some time to locate the cause. The bug seems to only occur if there is a wrapping div with a background color set. Did I say it was a weird bug?
I figured out it was a z-index issue. A z-index of -1 is used, which places the item to be behind the background. The solution is to change these lines:
So I have this weird transition bug when using the fade transition. The fade transition works as expected on all images except the last one. When the last image should be fading to the first image, the fading is failing. There is a flash instead of a smooth fade.
I encountered this on a website I'm building, and it took me some time to locate the cause. The bug seems to only occur if there is a wrapping div with a background color set. Did I say it was a weird bug?
To illustrate I cloned your Codepen with the simple fade transition:
http://codepen.io/peduarte/pen/RWbORJ
And just added a wrapping div with a background color:
http://codepen.io/olach/pen/OyyYVE
If you try my forked version (tested in Safari and Chrome) you should see the transition bug when the last image is fading to the first.
I have no idea why this is happening. I have tried some workarounds with css but with no luck.
Do you have any idea?
The text was updated successfully, but these errors were encountered: