背景附件修复了转换在 Firefox 中不起作用 [英] background-attachment fixed with transform not working in Firefox

查看:30
本文介绍了背景附件修复了转换在 Firefox 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CSS 值转换在 Firefox 中关闭 background-attachment: fixed.

CSS value transform turn off background-attachment: fixed in Firefox.

这是示例

div {
   transform: translate3d(0,0,0); // if remove starts to work
   width: 100%;
   height: 2000px;
   background-image: url('http://www.wallpapereast.com/static/images/001_Fish-Wallpaper-HD_hkNsK33.jpg');
   background-size: cover;
   background-attachment: fixed;
}

<div></div>

如果您从 CSS 中删除转换,它就会开始工作.仅可在 FF 中重现.

if you remove transform from CSS it starts to work. Reproducible only in FF.

推荐答案

background-attachment:fixed; 在任何转换"是已申请

background-attachment:fixed; doesn't work when any 'transform' is applied

这是 Firefox 中的一个错误,尚未修复.

and that's a bug in firefox and it is not yet fixed.

参考:https://bugzilla.mozilla.org/show_bug.cgi?id=1292499

这篇关于背景附件修复了转换在 Firefox 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆