Jump to content
Search Community

Horizontally-scrolling text shows scoll bar during scroll

marcojhb test
Moderator Tag

Recommended Posts

Hi all,

 

Very new to GSAP here. I've almost got this animation covered, except that during the scrolling phase, a scroll bar appears. I've tried multiple variations of overflow: hidden, but nothing seems to work. Essentially I'd like to achieve what I've got at the moment, but without the horizontal scroll bar.

 

Also, if my GSAP could be improved in any way, that would be great too!

See the Pen podvVxZ by marcojhb (@marcojhb) on CodePen

Link to comment
Share on other sites

Welcome to the forums @marcojhb

 

You're probably going to need to add a wrapper container with overflow set to hidden, so you're going to need to rework your layout and CSS a bit.

 

Also, you should never use an all transition on an element that GSAP is going to animate. That's why your animation isn't smooth. 

 

.scroll-text {
  margin-top: -100rem;
  position: sticky;
  top: 0;
  margin-left: 60rem;
  white-space: nowrap;
  z-index: -1;
/*   transition: all 0.5s; */
  will-change: transform;
}

 

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