Jump to content
Search Community

ScrollTrigger Horizontal doesn't do his thing in mobile

BeatlesBOB
Moderator Tag

Go to solution Solved by akapowl,

Recommended Posts

Posted

Hello, I'm trying to make a Timeline using scrolltrigger, I'm quite new to gsap and developpement.
The thing works quite fine but on mobile, when I press f12 the scrolltrigger doesn't pin and animate.
 

Have you  any idea to solve this ?

See the Pen LYjWwxG by beatlesbob (@beatlesbob) on CodePen.

Posted

Hi @BeatlesBOB,

 

I'm afraid I'm not sure what you mean by 

1 hour ago, BeatlesBOB said:

when I press f12 the scrolltrigger doesn't pin and animate.


F12 on my mac is just a volume button - have you got a shortcut to something on your machine?

What are you expecting to happen?

  • Solution
Posted
1 hour ago, BeatlesBOB said:

The thing works quite fine but on mobile, when I press f12 the scrolltrigger doesn't pin and animate.

 

Hello @BeatlesBOB

 

Try setting overflow-x to hidden on your .wrapper - that overflow is probably what's causing the whole layout to shift in that view. It does fix it for me - is that better for you, too?

 

Edit: I suppose you are talking about the dev-tools opening on press of F12 (Chrome on Windows does that) and the mobile view of the dev-tools accordingly-.

 

.wrapper{
  display: flex;
  flex-wrap: nowrap;
  overflow-x: hidden;
}

 

Posted
13 minutes ago, akapowl said:

 

Hello @BeatlesBOB

 

Try setting overflow-x to hidden on your .wrapper - that overflow is probably what's causing the whole layout to shift in that view. It does fix it for me - is that better for you, too?

 

Edit: I suppose you are talking about the dev-tools opening on press of F12 (Chrome on Windows does that) and the mobile view of the dev-tools accordingly-.

 

.wrapper{
  display: flex;
  flex-wrap: nowrap;
  overflow-x: hidden;
}

 

Hi, thank you for your reply, Yhea it totally do the job, thank you very much, and I was talking about dev tools, sorry for my poor explanation. @Cassie

  • Like 1

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