Created
May 23, 2020 10:30
-
-
Save prantu/9499218ddfaf00b331e7f6a7d425c791 to your computer and use it in GitHub Desktop.
How to disable AOS animation of specific element on mobile without disabling whole AOS library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* How to turn off AOS animation in mobile screens? | |
| https://stackoverflow.com/questions/53952611/how-to-turn-off-aos-animation-in-mobile-screens */ | |
| @media screen and (max-width: 480px) { | |
| .disable-aos-mobile [data-aos], | |
| .disable-aos-mobile[data-aos] { | |
| /*CSS transitions*/ | |
| opacity: 1 !important; | |
| -o-transition-property: none !important; | |
| -moz-transition-property: none !important; | |
| -ms-transition-property: none !important; | |
| -webkit-transition-property: none !important; | |
| transition-property: none !important; | |
| /*CSS transforms*/ | |
| -o-transform: none !important; | |
| -moz-transform: none !important; | |
| -ms-transform: none !important; | |
| -webkit-transform: none !important; | |
| transform: none !important; | |
| /*CSS animations*/ | |
| -webkit-animation: none !important; | |
| -moz-animation: none !important; | |
| -o-animation: none !important; | |
| -ms-animation: none !important; | |
| animation: none !important; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment