我有一个棘手的问题。也许有人知道为什么透视图在Firefox上不起作用,但是在chrome上却可以正常工作。
以下是我使用过的一些CSS:
@mixin perspective-parallax{
-webkit-perspective: 100px;
-moz-perspective: 100px;
perspective: 100px;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
overflow-x: hidden;
overflow-y: hidden;
}
@mixin parralax-item{
@include flex;
flex: 1 0 auto;
position: relative;
height: 600px;
-webkit-transform: translateZ(-1px) scale(2);
-ms-transform: translateZ(-1px) scale(2);
-moz-transform: translateZ(-1px) scale(2);
transform: translateZ(-1px) scale(2);
z-index: -1;
}
.top-slider{
text-align: center;
@include perspective-parallax;
height: 600px;
.bx-slider {
.main-slide-1{
background: url('../img/bulb-2587637_1920.jpg') top center no-repeat fixed;
@include main-slide;
@include parralax-item;
}
}
}