这个问题只出现在Firefox中,在打开检查器之前,样式不会起作用。我认为这与透视或转换风格有关,但我所做的似乎都无济于事
.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;
}感谢您的帮助,谢谢!
发布于 2019-07-01 20:15:09
为.id-card使用height:300px它会起作用的
.id-card {
/*height: 100%;*/
height: 300px;
min-height: 300px;
position: relative;
-moz-perspective: 1000px;
-webkit-perspective: 1000px;
perspective: 1000px;
clear:both;
}https://stackoverflow.com/questions/56835082
复制相似问题