Jump to content
Search Community

Infinie Scrolling Text

Vincent07 test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

Hi everybody!

 

I'm trying to do a simple animation... but it's complicated :D

 

 

 

The code is simple:

<div class="rotator">
     <span class="keyword">DESIGN</span>
     <span class="keyword">DIGITAL</span>
</div>

I looked other examples on gsap forums, but i always have a problem with the "infinite", and I can't control the dwell time of each word

 

What am I doing wrong?

Thanks a lot!

 

Vincent

 

 

2023-04-03_16h56_43.png

See the Pen GRXVQPV by pit07 (@pit07) on CodePen

Link to comment
Share on other sites

  • Solution

Hi,

 

This is mostly a logic issue when looping through the elements. You definitely don't need to create a duplicate of the first element, just add an onComplete to the animation that moves each element down, in order to move it to the top again.

 

Here is a live example of the way I'd do this:

See the Pen GRXVPZE 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...