我正在尝试从以下website实现翻转动画,我让它在没有悬停效果的情况下工作,并使用按钮切换过渡。见Fiddle
IE的给定代码在悬停时效果很好,但是通过使用按钮,第二个按钮显示在右上角,文本已镜像。有人可以建议我如何让它在左上角显示正常,就像在其他浏览器中一样吗?这是针对IE的css片段:
/* entire container, keeps perspective */
.flip-container {
perspective: 1000;
transform-style: preserve-3d;
}
/* UPDATED! flip the pane when hovered */
.flip-container.hover .back {
transform: rotateY(0deg);
}
.flip-container.hover .front {
transform: rotateY(180deg);
}
.flip-container, .front, .back {
width: 100%;
height: 500px;
}
/* flip speed goes here */
.flipper {
transition: 0.6s;
transform-style: preserve-3d;
position: relative;
}
/* hide back of pane during swap */
.front, .back {
backface-visibility: hidden;
transition: 0.6s;
transform-style: preserve-3d;
position: absolute;
top: 0;
left: 0;
}
/* UPDATED! front pane, placed above back */
.front {
z-index: 2;
transform: rotateY(0deg);
}
/* back, initially hidden pane */
.back {
transform: rotateY(-180deg);
}
/*
Some vertical flip updates
*/
.vertical.flip-container {
position: relative;
}
.vertical .back {
transform: rotateX(180deg);
}
.vertical.flip-container:hover .back {
transform: rotateX(0deg);
}
.vertical.flip-container:hover .front {
transform: rotateX(180deg);
}
}
答案 0 :(得分:1)
IE已知转换属性的问题。对于您的示例,在仅IE样式上从父div中删除悬停(.hover)上的转换。请参阅fiddle。
.flip-container.hover .flipper {
transform: none;
}