Last active
May 29, 2022 02:50
-
-
Save kobitoDevelopment/46b1ede19eaa0a4c2c2a288e979e0bd8 to your computer and use it in GitHub Desktop.
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
| <p class="hoge">ボタン</p> | |
| <p class="fuga">ボタン</p> |
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
| const hoge = document.querySelector(".hoge"); | |
| const fuga = document.querySelector(".fuga"); | |
| hoge.addEventListener("click", function () { | |
| fuga.classList.add("is-show"); | |
| }); |
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
| .fuga { | |
| display: none; | |
| &.is-show { | |
| display: block; | |
| animation: fugaAnm 1s 0s forwards; | |
| } | |
| } | |
| @keyframes fugaAnm { | |
| 0% { | |
| opacity: 0; | |
| } | |
| 100% { | |
| opacity: 1; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment