Jump to content
Search Community

ScrollTrigger over top of absolute position elements

Drexel test
Moderator Tag

Recommended Posts

This might be sometime simple that I am missing. I have a couple simple scorllTrigger elements and they work just fine. I also have a simple mobile menu that I built and is using absolute position to sit over the entire viewport when activated. This is also working as intended. What I can't seem to figure out is the elements that I applied scrollTrigger on are sitting on top of my absolute positioned elements. No matter how big I make the z-index for the mobile menu the scorllTrigger elements are always on top. I'm hoping this is a simple thing that I overlooked in the docs. 

 

After a little more digging it seems that this is causing the issue
gsap.set(".yellow-bar", {transformOrigin: "left center"});

When you scroll the codepen you should not be able to see the bars

 

added a codepen to show the issue

See the Pen KKXyYao by icekomo (@icekomo) on CodePen

Edited by Drexel
added pen
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...