rafyc Posted October 25, 2020 Share Posted October 25, 2020 Hi, I have an issue usig gsap and try to understand what's going on. In introduction when the page is loaded there is an overlay fading from 100% to 0% opacity with gsap letting appear the home page. It's working but : All that is uneder this overlay doest support mouse hover, or text select because this overlay (with "z-index: 99") still present with 0% opacity . If i inspect with dev tool and don't display the overlay, it's working again. Is there a way to hide this overlay after being animated ? I think it's a basic issue but quite new in gsap coding. Thanks for your help .my-overlay { position: absolute; width: 100%; height: 100%; top: 0%; z-index: 99; } gsap.to(".first", { duration: 1, ease: "circ.in", opacity: 0 }) <div class="my-overlay first"></div> Link to comment Share on other sites More sharing options...
Solution GreenSock Posted October 25, 2020 Solution Share Posted October 25, 2020 Two things: You can use autoAlpha: 0 instead of opacity: 0. The only difference is that autoAlpha automatically changes "visibility" to "hidden" when it hits zero. In your CSS, set pointer-events: none to let the pointer events go "through" it. Happy tweening! 1 Link to comment Share on other sites More sharing options...
rafyc Posted October 25, 2020 Author Share Posted October 25, 2020 Many thanks ! 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