Jump to content
Search Community

Horizontal ScrollTrigger with navigation and variable width sections?

VikAPAD test
Moderator Tag

Go to solution Solved by VikAPAD,

Recommended Posts

I am using the "Anchor navigation to ScrollTriggered section" as a starting point and I am wondering how I would go about modifying it so that the panels can be variable widths. For example, I would like the first panel to be only 50vw and the rest 100vw. I tried changing this in the CSS, but it throws off the scrolling and the snapping. How could I go about altering this to automatically detect panels which are not 100vw and have the navigation and scrolling snap to those panels and their siblings accordingly?

 

 

See the Pen vYrrZpj by VikAPAD (@VikAPAD) on CodePen

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...