Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Ali Manuel

why the element are not fixed ?

Recommended Posts

As you see in codepen link the animation work but not well, when you make a scroll the red element move as normal, also the blue element works normally, but if you continue scrolling, you will arrive at to step, you can't look at the animation.
I want to  move it as a position fixed moving my scroll.
 

Quote

I want to make animation like iPhone se

 

See the Pen dypREby by itsalimanuel (@itsalimanuel) on CodePen

Link to comment
Share on other sites

Hey Ali and welcome to the GreenSock forums.

 

The elements never become fixed because you never give them a position of fixed or pin them using ScrollTrigger. I'm a bit confused as to how you're expecting it to stay in place with only the code that you have.

 

Perhaps it'd be helpful to go back and watch the video about ScrollTrigger that's in the documentation.

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