The issue only appears in Firefox, the styling won't work until the inspector opens. I assume it has something to do with perspective or transform-style, but nothing I do seems to help
CodePen
.id-card {
height: 100%;
min-height: 300px;
position: relative;
-moz-perspective: 1000px;
-webkit-perspective: 1000px;
perspective: 1000px;
}
.id-card-inner {
border-radius: 10px;
box-shadow: 0px 5px 10px 0px #bababa;
text-align: left;
position: relative;
width: 100%;
height: 100%;
transition: transform 0.6s;
-moz-transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.id-card:hover .id-card-inner {
transform: rotateY(180deg);
}
.id-card-front, .id-card-back {
position: absolute;
width: 100%;
height: 100%;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
padding: 25px;
}
.id-card-front {
z-index: 1;
}
.id-card-back {
background-color: #fff;
transform: rotateY(180deg);
z-index: 1;
overflow-y: auto;
}
.id-card img {
max-width: 200px;
float: right;
}
Video
Any help is appreciated, thanks!
use height:300px for .id-card it will works
.id-card {
/*height: 100%;*/
height: 300px;
min-height: 300px;
position: relative;
-moz-perspective: 1000px;
-webkit-perspective: 1000px;
perspective: 1000px;
clear:both;
}
Check the updated codepen here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With