Animations disappearing when having overflow-x: hidden on CSS
See original GitHub issueThis is:
- Bug
Specifications
- AOS version: latest
- Browser: tested on Firefox, chrome
Expected Behaviour
Animations should fade in and stay there
Actual Behaviour
Animations fade in but are disappearing after animation is done
Steps to Reproduce the Problem
CSS to reproduce:
/* Google Chrome White space Bug */
html,
body {
overflow-x: hidden;
}
Detailed Description
I use overflow-x: hidden
to prevent the chrome smartphone bug and after changing some CSS out of desperation I got it working by deleting it.
Possible Solution
take out overflow-x: hidden when deploying
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Appearing element disappears after animation - Stack Overflow
I suspect the element to take back its hidden value right after the animation ends and I don't know how to make its...
Read more >overflow-x - CSS: Cascading Style Sheets - MDN Web Docs
The overflow-x CSS property sets what shows when content overflows ... If overflow-y is hidden , scroll or auto and this property is...
Read more >Hide Scrollbars During an Animation - CSS-Tricks
But the magic number isn't the only problem. Another problem is scrollbars. When we set max-height: 0; , we also need overflow: hidden;...
Read more >Second scrollbar appearing and disappearing ... - GreenSock
Something must be overflowing, you can fix that by setting overflow: hidden to whatever element is getting this scroll bar. You have set ......
Read more >Overflow Issues In CSS - Smashing Magazine
If you have overflow, then it's better to solve the root issue. Moreover, applying overflow-x: hidden to the body element is not a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The fix is easy:
Create a div with the whole body content;
in css:
body>div {overflow-x:hidden;}
You can see the fix working here: https://garciaesa.adv.br/
For those using the following webkit scrollbar / media query workaround:
AOS v2 fork changes window scroll listener and variables to use document.body: https://github.com/imagex/aos/tree/v2 https://github.com/imagex/aos/commit/23e7b3d5583da6dfa1f564b8224cfd60d52cac39