greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.83k stars 1.72k forks source link

zIndex on TweenLite.set doesn’t work #308

Closed NasKadir123 closed 5 years ago

NasKadir123 commented 5 years ago

Hello! I've got a problem with the zIndex, I have two blocks in position absolute, so I trying to move the last one forward, it works, except zIndex, here some of my code:

TweenLite.set(slides[index], { zIndex: 1 })

But zIndex still 0. Can you help me, please?

jackdoyle commented 5 years ago

It's very difficult to troubleshoot blind, but it seems to work great: https://codepen.io/GreenSock/pen/d896486c257e4d2d56618756a84fbd0d?editors=0010

I wonder if maybe you forgot to load CSSPlugin?

If you're still having trouble, please provide a reduced test case in codepen or something like that so we can see what's going on in context.

Happy tweening!

NasKadir123 commented 5 years ago

It's very difficult to troubleshoot blind, but it seems to work great: https://codepen.io/GreenSock/pen/d896486c257e4d2d56618756a84fbd0d?editors=0010

I wonder if maybe you forgot to load CSSPlugin?

If you're still having trouble, please provide a reduced test case in codepen or something like that so we can see what's going on in context.

Happy tweening!

Sorry for late, I was away from the computer, I made such a silly mistake! Thanks a lot! Sorry again.