Jump to content
Search Community

Rotate element on scroll in the middle is not working

jafar70 test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hi, I am trying to create a page break animation. 

 

The desired outcome:

image.thumb.png.d076ce08b33a30fa2967801978bb99eb.png

 

My problem:

I am having issues trying to centre the blue gradient. The position of the blue gradient also changes depending on the text above.

image.thumb.png.166c38dd53f7b96eb075acf3fb363a5a.png

 

See the Pen zYQpmKW by mrsalami (@mrsalami) on CodePen

Link to comment
Share on other sites

  • Solution

Hi! Could you explain in more detail what you're intending to do?

 

I've made a guess and tweaked your code, but it's unclear whether you're trying to just position the element in the center and then rotate it, or whether you're trying to animate to a central position.

See the Pen OJYzrde?editors=0110 by GreenSock (@GreenSock) on CodePen



Also your trigger points seemed strange, were you intending the stretch the animation over the entire distance of the page? The element is only in view for a short time so this seems a little wasteful? If I were you I'd define the pagebreak itself as the trigger.

 

Hope this helps!

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