Skip to content

Instantly share code, notes, and snippets.

@KittenCodes
Last active November 19, 2020 21:47
Show Gist options
  • Save KittenCodes/6d7fc1f23c60b1ad78871772d5ae1d01 to your computer and use it in GitHub Desktop.
Save KittenCodes/6d7fc1f23c60b1ad78871772d5ae1d01 to your computer and use it in GitHub Desktop.
CSS for Building A Flipbox In WordPress With Oxygen
.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