Jump to content
Search Community

Hiding text

Emilek1337 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm trying to animate the text so it goes out of the div, and the div has overflow hidden. I'm not sure if that's the right way to do it. I've set the height of the h1 to like 35px and I set the span's position absolute inside the h1, but the h1 is not getting the width of the span inside of it and I don't want to give a fixed width to the h1.

If u have to hide the text, do you do it like this? I don't want to play with autoAlpha etc. I just want to move the text outside the div. 

See the Pen drXbgX by vountish (@vountish) on CodePen

Link to comment
Share on other sites

36 minutes ago, Shaun Gorneau said:

hi @Emilek1337,

 

Here is a fork of your pen showing how to tween text outside of a div, but let the div mask anything outside. I've made a few notes within the pen to show you what I changed.

 

See the Pen bZeNbb by sgorneau (@sgorneau) on CodePen

 

Hope this helps!

Thank you so much, such an easy way to do it. I was overthinking it I guess..

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