Jump to content
Search Community

Help scrollTrigger and Pin

Jozua test
Moderator Tag

Go to solution Solved by akapowl,

Recommended Posts

Hello everyone.

I have a trouble with scrollTrigger, I want to pin #intro > .circle to top, I don't know why I pinned it but it jumps to right as you see in my codepen.

I tried trigger: "#intro .container" or trigger: "#intro .circle" but they have the same errors.

Please help me with scrollTrigger.

Thanks in advanced.

See the Pen rNMrKVo by Jozua (@Jozua) on CodePen

Link to comment
Share on other sites

  • Jozua changed the title to Help scrollTrigger and Pin
  • Solution

 

Hey @Jozua - welcome to the forums.

 

This seems to be related to the method of centering your .content up in your #intro with the transform-method.

I can not tell you much on the why, but a suggestion would be to maybe use display: flex on your #intro instead.

 

See the Pen 8e4337c8e9a7af4948b1a2fb5941c37a by akapowl (@akapowl) on CodePen

  • Like 1
  • Thanks 1
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...