Last active
November 19, 2020 21:47
-
-
Save KittenCodes/6d7fc1f23c60b1ad78871772d5ae1d01 to your computer and use it in GitHub Desktop.
CSS for Building A Flipbox In WordPress With Oxygen
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
.flipbox { | |
position: relative; | |
} | |
.flipbox__front, | |
.flipbox__back { | |
transition: 0.7s all ease-in-out; | |
backface-visibility: hidden; | |
} | |
.flipbox__front { | |
transform: rotateY(0deg); | |
transform-style: preserve-3d; | |
} | |
body:not(.ng-scope) .flipbox__back { | |
position: absolute; | |
transform: rotateY(180deg); | |
transform-style: preserve-3d; | |
} | |
body:not(.ng-scope) .flipbox:hover .flipbox__front { | |
transform: rotateY(-180deg); | |
} | |
body:not(.ng-scope) .flipbox:hover .flipbox__back { | |
transform: rotateY(0deg); | |
} | |
.flipbox__front *, | |
.flipbox__back * { | |
transform: translateZ(60px); | |
backface-visibility: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment