Aos: View port Bug on Mobile/Tablets

Created on 26 May 2017  路  5Comments  路  Source: michalsnik/aos

While the plugin works fine on PC browsers when it comes to mobile it's buggy.
On mobile/tablets after scrolling down to see the AOS effects on view there is a horizontal bar appearing - and you can drag the website left or right and the UI layout breaks.

I've tested on iPhone 7 Safari & iPad Safari.

Most helpful comment

I think we already agreed somewhere else that it's not necessarily issue in AOS itself. It's just how horizontal transform works, and that there should be overflow-x: hidden on parent container or body. I'll put this simple solution in the upcoming FAQ.

All 5 comments

@michalsnik

AOS UI FIX #156

01. The first selector CSS is not needed when Bootstrap 4 is used
02. The second CSS selector fixes the horizontal bar created on the container while animations are in place - on phones and tablets the site layout would break

*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }

.aos-all {
max-width: 100% !important;
width: 100% !important;
width: 100vw !important;
overflow: hidden;
margin: 0;
}

Here's a wee something I've just release that might help out: https://github.com/colingourlay/root-units

I think we already agreed somewhere else that it's not necessarily issue in AOS itself. It's just how horizontal transform works, and that there should be overflow-x: hidden on parent container or body. I'll put this simple solution in the upcoming FAQ.

Screenshot_2019-04-28-05-55-21
How to fix it?
Before loading the navbar isn't responsive.

@michalsnik The overflow-x: hidden; was a great hint for fixing navigation related issues on mobile (e.g. sticky navbar fixed-top in BS4). Big thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simmonsr picture simmonsr  路  4Comments

webcredo picture webcredo  路  3Comments

VeronikaMilic picture VeronikaMilic  路  4Comments

Ahearys picture Ahearys  路  4Comments

webdevnerdstuff picture webdevnerdstuff  路  3Comments