graingert / WOW

Reveal CSS animation as you scroll down a page
https://wowjs.uk
Other
1.58k stars 1.56k forks source link

Viewport Overflow-X (Horizontal Scrolling): how to solve it via wow.js? #31

Open JarisGV opened 4 years ago

JarisGV commented 4 years ago

I just started using wow.js and testing it in my mobile browser I noticed that the viewport becomes larger creating a horizontal scroll. I think the reason for the overflowing is that the animations like fadeInLeft, fadeInRight and similar ones start outside of the viewport.

1 - Viewport bug: On mobile browsers the width becomes larger than 100%. Wow - Overflowing Viewport - 1

2 - To solve it I add some lines in my CSS to hide the overflow-x of the <body>. Wow - Overflowing Viewport - 2

This solve the problem, but I wouldn't like to do a MacGyver on every page I create. In animate-plus.js, for example, this behavior is defined right in the JS file to avoid quick fix in CSS. So my question is: Is there a way to solve it directly in WOW.JS ?

Best regards, Jaris GV