Hi all,
I'm new to GSAP so i apologise if this is a stupid post, but I'm struggling to get Split Text to work when a heading is over 2 lines.
Here's a basic example (ignore the styling & animation, It's only to test) https://stevens-test-site-bd718d.webflow.io/home-copy It works fine if the heading is on one line (reveals out of its container etc) and I understand how that works. But when it's a heading over 2 lines like the example, the first line doesn't get wrapped. Have I totally misunderstood what Split Text does?. I know I could wrap a heading in a div, set overflow to hidden and repeat again with a second heading underneath, but I thought using Split Text was there to avoid doing it this way?
Have I got this totally wrong? Below is the script I used
<script>
let mySplitText = new SplitText(".split", { type: "lines"});
let lines = mySplitText.lines;
gsap.from(lines, {
yPercent: 105,
stagger: 0.02,
ease: "power4.out",
duration: 1.2
});
</script>
Thank you.