Skip to content

Instantly share code, notes, and snippets.

@chimmelb
Last active March 11, 2016 21:06
Show Gist options
  • Save chimmelb/8a8d3299580a2d37c771 to your computer and use it in GitHub Desktop.
Save chimmelb/8a8d3299580a2d37c771 to your computer and use it in GitHub Desktop.
.game-card {
position: relative;
transition: transform .5s linear 0s;
backface-visibility: hidden;
}
.game-card .front {
transform: rotateY( 180deg);
position: absolute;
}
.game-card.front.flipped {
transform: rotateY( 0deg);
}
.game-card .back {
transform: rotateY( 0deg);
}
.game-card.back.flipped {
transform: rotateY( -180deg);
}
<div class="game-card">
<div id="cardFront" class$="front {{isFlipped(show)}}" style$="width: {{cardWidth}}px; height: {{cardHeight}}px" on-click="flip">
<div class="rank left">{{rank}}</div>
<div class="rank right">{{rank}}</div>
</div>
<div id="cardBack" class$="back {{isFlipped(show)}}" style$="width: {{cardWidth}}px; height: {{cardHeight}}px" on-click="flip"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment