也许有人知道如何正确解决这个问题? 我的网站是用 Wordpress 制作的。 源页面完全相同,但页面背景有问题,而它在 Firefox 上显示为固定(并且大小也正确/覆盖),在 Chrome 上它被放大并随页面滚动。
页面示例: 网站在这里
Chrome 显然因这个问题而闻名,但我想知道是否有一个有效的解决方法来解决并以原始比例查看我的背景(当然也可以在设备上响应)
谢谢你让我知道, 布鲁诺
我找不到解决方案,因为代码实际上是相同的,只是浏览器响应能力发生了变化
好的,我找到了代码(附后):
铬:
.edgtf-parallax-row-holder {
height: auto!important;
min-height: 200px!important;
background-attachment: scroll;
background-position: center top!important;
background-size: cover
}
火狐
.edgtf-parallax-row-holder {
position:static;
padding:0;
background-attachment:fixed;
background-color:transparent;
background-position:center 0;
background-repeat:no-repeat;
-webkit-transform:translateZ(0);
transform:translateZ(0);
-moz-transform:none;
overflow:hidden
}
问题是 Chrome 强制拒绝“封面”标签,而且如果我尝试将背景附件从“滚动”更改为“固定”,则不会保持在原位。