Jump to content
Search Community

Fading Elements Inside Pinned Container While Scrolling

Daqu test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

I want to make an effect like it is on this page: https://www.tagheuer.com/int/en/smartwatches/tagheuer-connected-collaboration.html

 

Scroll down to the area where the watch face is on the right side and on the left side texts are fade/changing one-by-one depending on page scroll amount.

 

I made a simple Codepen example without fades.

 

 

XdooS-min.png

See the Pen QWvYdQL by giorgi-khachapuridze (@giorgi-khachapuridze) on CodePen

Link to comment
Share on other sites

  • Solution

 

Hey there Daqu,

 

Welcome to the forums. 🥳

In order to achieve this you'll need to position all the text on top of each of each other using CSS - then use opacity or autoAlpha to fade them in and out on that timeline. You can use scrub:true to link the animations to the scroll position

I've commented out the third text for simplicity and added in some simple transitions to demo this for you

See the Pen WNjPjwd?editors=1010 by GreenSock (@GreenSock) on CodePen

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