Created
September 25, 2018 09:03
-
-
Save EbiseLutica/ee04067fd46ceeaa5915cf4cd027cc4d to your computer and use it in GitHub Desktop.
PdrNMo
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
button(type="button" onclick="Toggle();" style="color: red; font-size: 32px") test | |
.wrapper | |
#box lorem ipsum dolor sit amet A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
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
const box = document.getElementById("box"); | |
function Toggle() { | |
box.classList.toggle("away"); | |
} |
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
.wrapper { | |
width: 8rem; | |
perspective: 800px; | |
transform-style: preserve-3d; | |
position: relative; | |
height: 100vh; | |
} | |
#box { | |
display: block; | |
width: 4rem; | |
left: 2rem; | |
height: auto; | |
top: 64px; | |
background-color: white; | |
border-radius: 1rem; | |
padding: 1rem; | |
box-shadow: 0 0 1rem; | |
position: absolute; | |
transition: all 0.2s ease; | |
&.away { | |
transform: translateY(-300px) translateZ(-600px); | |
z-index: -100px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment