Hover over the white circles to reveal the magic letters.
Created
August 2, 2022 11:06
-
-
Save Ssenseii/4bf0f28837c748e756e52270073af424 to your computer and use it in GitHub Desktop.
Flashcard Rotation
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
| <a target="_blank" href="https://github.com/Ssenseii"> | |
| <div class="display__items-element bit"> | |
| <button id="btnI1" class="bit__button">A</button> | |
| <button id="btnB" class="bit__button">B</button> | |
| <button id="btnI2" class="bit__button">C</button> | |
| <button id="btnT" class="bit__button">D</button> | |
| </div> | |
| </a> |
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
| var btnI1 = document.getElementById("btnI1"); | |
| btnI1.addEventListener("mouseover", function () { | |
| btnI1.classList.toggle("rotateBit"); | |
| }) | |
| var btnI2 = document.getElementById("btnI2"); | |
| btnI2.addEventListener("mouseover", function () { | |
| btnI2.classList.toggle("rotateBit"); | |
| }) | |
| var btnB = document.getElementById("btnB"); | |
| btnB.addEventListener("mouseover", function () { | |
| btnB.classList.toggle("rotateBit2"); | |
| }) | |
| var btnT = document.getElementById("btnT"); | |
| btnT.addEventListener("mouseover", function () { | |
| btnT.classList.toggle("rotateBit"); | |
| }) |
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
| a{ | |
| text-decoration: none; | |
| } | |
| .bit{ | |
| display: flex; | |
| flex-direction: row; | |
| justify-content: center; | |
| align-items: center; | |
| justify-content: space-evenly; | |
| background-color: #000; | |
| height: 10rem; | |
| } | |
| .bit__button{ | |
| height: 4rem; | |
| width: 4rem; | |
| border: 2px solid white; | |
| border-radius: 5px; | |
| background-color: transparent; | |
| font-family: 'video'; | |
| font-size: 48px; | |
| transform: rotateY(0deg); | |
| transition: transform 1s; | |
| } | |
| .bit__button:hover{ | |
| cursor: pointer; | |
| } | |
| .rotateBit{ | |
| background-color: white; | |
| transform: rotateY(360deg); | |
| transition: transform 0.5s; | |
| } | |
| .rotateBit2{ | |
| background-color: white; | |
| transform: rotateY(360deg); | |
| transition: transform 1s; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment