Jump to content
Search Community

Move element at center and expand it as user scroll down

midnightgamer test
Moderator Tag

Recommended Posts

1 hour ago, mikel said:

Why does the width jump to 100%

You're animating between a pixel width and a percent width so it can't smoothly animate (neither of your demos work very smoothly on my computer). 

 

I really don't understand what @midnightgamer is trying to do with the CSS of .text-div. Here's how I'd set it up:

See the Pen NWNVOPJ?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Note that I also changed your start and end positions because your end position was before your start position which made the tween finish instantly.

  • Like 2
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...