Jump to content
Search Community

Animate white vertical bar with scroll-trigger.

GsapLover test
Moderator Tag

Recommended Posts

Hi,

 

The animation for the bar should be super simple and you can tie it up to the ScrollTrigger instance that pins the black section. Just be aware that you have this on your CSS:
 

.bar {
  position: absolute;
  left: -2px;
  top: 0;
  width: 6px;
  height: 120px;
  background: #fff;
  content: "";
  border-radius: 60px;
  transition: all 1s cubic-bezier(0, 0, 0, 1.35);
  -webkit-transition: all 1s cubic-bezier(0, 0, 0, 1.35);
}

Mixing CSS transitions and GSAP is not recommended at all, as Jack explains in this post:

The rest is just some extra conditional logic in the text loops and override some styles for the first text element.

 

Here is a fork of the demo:

See the Pen gOZJpZW by GreenSock (@GreenSock) on CodePen

 

Hopefully this helps.

Happy Tweening!

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