Last active
May 29, 2020 17:26
-
-
Save chouzar/eed26400234c5feb2583410b0cdc6e55 to your computer and use it in GitHub Desktop.
CSS animation
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
| .step { | |
| position: relative; | |
| transition: linear 200ms opacity; | |
| opacity: 1; | |
| animation-duration: 200ms; | |
| } | |
| .step.left, | |
| .step.right { | |
| transition-delay: 200ms; | |
| } | |
| .step.hide, | |
| .step.hide { | |
| opacity: 0; | |
| } | |
| .step.show., | |
| .step.show. { | |
| opacity: 1; | |
| } | |
| .step.left.hide { animation-name: hide-left; } | |
| .step.left.show { animation-name: show-left; } | |
| .step.right.hide { animation-name: hide-right; } | |
| .step.right.show { animation-name: show-right; } | |
| @keyframes hide-left { | |
| from {left: 0; opacity: 1;} | |
| to {left: -15px; opacity: 0;} | |
| } | |
| @keyframes show-left { | |
| from {left: -15px; opacity: 0;} | |
| to {left: 0; opacity: 1;} | |
| } | |
| @keyframes hide-right { | |
| from {left: 0; opacity: 1;} | |
| to {left: +15px; opacity: 0;} | |
| } | |
| @keyframes show-right { | |
| from {left: +15px; opacity: 0;} | |
| to {left: 0; opacity: 1;} | |
| } | |
| .step.fixate { | |
| position: absolute; | |
| width: 100%; | |
| left: 0; | |
| top: 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment