Created
August 9, 2023 02:31
-
-
Save Mix-Liten/5ad1319b06dcdd15612b570a97e54b5d to your computer and use it in GitHub Desktop.
Basic Fade In/Out CSS
This file contains 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
/* default DOM */ | |
/* <div class="hide">...</div> */ | |
/* show */ | |
/* el.classList.replace('hide', 'show'); */ | |
/* hide */ | |
/* el.classList.replace('show', 'hide'); */ | |
.show { | |
opacity: 1; | |
transition: opacity 400ms; | |
} | |
.hide { | |
opacity: 0; | |
transition: opacity 400ms; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment