Created
May 13, 2019 00:04
-
-
Save gnanakeethan/29722c6db4ffdb55609b49ef1371cb24 to your computer and use it in GitHub Desktop.
FlashCard File
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
.ios, .md { | |
flash-card { | |
/* | |
* Flip animation by David Walsh: https://davidwalsh.name/css-flip | |
*/ | |
/* entire container, keeps perspective */ | |
.flip-container { | |
perspective: 1000px; | |
} | |
/* flip the pane when hovered */ | |
.flip-container.flipped .flipper { | |
transform: rotateY(180deg); | |
} | |
.flip-container, .front, .back { | |
width: 90vw; | |
height: 40vh; | |
margin: 20px auto; | |
} | |
/* flip speed goes here */ | |
.flipper { | |
transition: 0.6s; | |
transform-style: preserve-3d; | |
position: relative; | |
} | |
/* hide back of pane during swap */ | |
.front, .back { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
background-color: #ecf0f1; | |
backface-visibility: hidden; | |
-webkit-box-shadow: 0px 8px 4px -4px rgba(163,163,163,0.25); | |
-moz-box-shadow: 0px 8px 4px -4px rgba(163,163,163,0.25); | |
box-shadow: 0px 8px 4px -4px rgba(163,163,163,0.25); | |
border: 1px solid #dee2e3; | |
margin: 0; | |
position: absolute; | |
top: 0; | |
left: 0; | |
} | |
/* front pane, placed above back */ | |
.front { | |
z-index: 2; | |
/* for firefox 31 */ | |
transform: rotateY(0deg); | |
} | |
/* back, initially hidden pane */ | |
.back { | |
transform: rotateY(180deg); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment