Sass 如何使视差在Firefox中工作?
我的密码笔上有一个镀铬的。最重要的代码如下:Sass 如何使视差在Firefox中工作?,sass,Sass,我的密码笔上有一个镀铬的。最重要的代码如下: body { height : $body-height; perspective : #{$perspective}px; perspective-origin : 0; -webkit-overflow-scrolling : touch; // Safari fix } @at-root body, .parallax-container {
body {
height : $body-height;
perspective : #{$perspective}px;
perspective-origin : 0;
-webkit-overflow-scrolling : touch; // Safari fix
}
@at-root body,
.parallax-container {
overflow-x : hidden;
overflow-y : auto;
position : relative;
}
@at-root body {
@at-root .parallax-container {
// position
transform-style : preserve-3d; // to avoid that the intermediary container flattens the effect
// size
height : 100%;
width : 100%;
@at-root {
.background-content,
.foreground-content {
position : relative;
}
.background-content {
transform-origin : 0 0;
transform : translateZ(0) scale(1);
}
div.other-class {
$value : 126;
height : #{$value}px;
bottom : #{-($value + 35)}px;
}
}
}
}
我读了很多关于视差的东西,但仍然不明白这里出了什么问题。
我相信有一次我成功了,也许这是一种倒退,但我找不到问题所在。
如果Safari在Safari上也不起作用,请毫不犹豫地为Safari提供建议,因为我还不能在此浏览器上测试它
我在Firefox 82.0.3和Chromium 86.0.4240.198上,在Ubuntu 20.04上。如果我找到了问题的根源,或者问题不难解决……我可能不会发布这个……你帮不了我。但我不会强迫你帮助我。如果你需要一些具体的东西,我可以添加它们,但是你的评论一点用处都没有。无意冒犯。如果你想快速得到答案,你应该提供问题或工作示例,没有人知道你的CSS块是如何与HTML集成的,问题甚至可能不在CSS中。工作示例是通过CodePen链接提供的,至少正如我所说,它在Chrome上工作。。。因此,除非你不知道什么是视差,否则问题很明显。现在还不清楚问题是什么,通过工作示例,我假设一个网站上的视差工作,所以iframe对你来说是不够的?因为在这个链接中,如果你用Chrome打开它,你会看到视差,如果你打开开发工具,你会看到相关的HTML和CSS。如果愿意,您甚至可以复制iframe代码,将其放入计算机上的本地示例中。