Jump to content
Search Community

Recommended Posts

Posted

I just want to trigger the effect when scroll hit the screen for one time only 

 

Thank you for replying 

Posted

I just want to trigger the effect when scroll hit the screen for one time only 

 

This is the code for text reveal i just want to add scroll trigger effect in this 

 

const childSplit = new SplitText("h1", {

  type: "lines",

  linesClass: "split-child"

});

const parentSplit = new SplitText("h1", {

  // type: "lines",

  linesClass: "split-parent"

});

 

gsap.from(childSplit.lines, {

  duration: 1.5,

  yPercent: 100,

  ease: "power4",

  stagger: 0.1

});

 

 

 

 

 

Thank you for replying 

  • 3 months later...
Wizard of Oz
Posted

Hi, I am trying  to recreate this using the the toArray utility method. Any idea why mine does not work? :)

 

Thanks in advance for the feedback

 

See the Pen JjJddVR by martinkariuki7-the-looper (@martinkariuki7-the-looper) on CodePen.

Wizard of Oz
Posted

Thank you so much for the quick answer @akapowl You are a superhero indeed :) Although I have to say It's not really "my code." I just took what Zach wrote earlier and tried using that in a loop. So all credit should go to you superheroes.

 

Have a good day ahead.

 

  • Like 1
  • Thanks 1
  • 2 weeks later...
Posted

Hi, I noticed a weird thing. When I use the letter "Å" which is a Norwegian character, it get's chopped off a bit. Is there a way to avoid this happening?

 

See the Pen JjJddVR by martinkariuki7-the-looper (@martinkariuki7-the-looper) on CodePen.

Posted

If you add some padding-top to split-parent or increase the line-height it should sort that out!

  • Like 1
  • 2 years later...
Posted

@ZachSaucier when using your technique how can i fix clipped descenders. I tried playing with padding and margin but it jumps around 

Screenshot 2023-11-02 at 11.40.58 pm.png

Posted

Hey @mattpilott. It's super tough to diagnose without seeing a minimal demo. Can you provide a CodePen or Stackblitz that illustrates the issue please? It seems like padding on the container that has overflow: hidden is what you'd need. 

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