I'm struggling to implement a flip effect where the content of a div changes, but I can't seem to prevent the text from disappearing after a few seconds.
I've tried using backface-visibility:hidden with no luck!
HTML
<div class="cards">
<div class="front">
This is the front
</div>
<div class="back">
This is the back
</div>
</div>
CSS
.cards {
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
transition: transform 2s;
-webkit-transition: transform 2s;
transition-delay:0s;
-webkit-transition-delay:0s;
background:url('http://www.giantfreakinrobot.com/wp-content/uploads/2012/08/Mad-Max.jpg');
background-size:cover;
}
.cards.flipped{
transform: rotateY( 180deg );
-webkit-transform: rotateY( 180deg );
background:url('http://www.giantfreakinrobot.com/wp-content/uploads/2012/08/Mad-Max.jpg');
background-size:cover;
}
.back{
transform: rotateY( 180deg );
-webkit-transform: rotateY( 180deg );
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.front{
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
Any suggestions or solutions?