Last active
March 29, 2023 01:19
-
-
Save JezDriver/dc7c09cb1a5190a6fd083506a4bd06b3 to your computer and use it in GitHub Desktop.
A versatile keyframe animation configured using css variables #css
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
| @keyframes fadeInX { | |
| from { | |
| opacity: 0; | |
| transform: translateX(var(--fadeInDist, 1rem)); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateX(0); | |
| } | |
| } | |
| .example { | |
| --fadeInXDist: -3rem; | |
| animation: fadeInX 1s ease; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment