火狐背景附件:固定的噩梦 [英] Firefox background-attachment: fixed Nightmare

查看:163
本文介绍了火狐背景附件:固定的噩梦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在这一头拉着我的头发,我希望比我聪明的人能弄明白。



我正在做一个新的设计为我的网站,我已经遇到了似乎是一个Firefox的错误。我正在使用background-attachment:在< body> 元素上修正渐变,然后我有一个完整宽度< div> code>与页面顶部的另一个背景图片。只有在Firefox中,页面顶部和< div> 背景两边都有一个小小的白色边框。



我试过至少有六种不同的HTML和CSS编码方式,它们都产生相同的结果。此外,白色的差距似乎没有在早期版本的Firefox(我注意到它在版本6)。我甚至做了一个干净的Firefox重新安装没有任何附加组件,我仍然看到它。任何想法是什么导致这个?我的代码在某些方面是错误的吗?



这里看到简化的测试用例: http://mygemologist.com/bg-fixed-test.html



注意:这个问题可能与以下几点有关: Firefox中的疯狂CSS问题 - 固定位置背景颜色,但我不知道这一点。

解决方案

Dominic,请参阅 https://bugzilla.mozilla.org/show_bug.cgi?id=677095 这个问题和 https://bugzilla.mozilla.org/show_bug.cgi?id=677095#c47 a>可能的解决方法。

I have been pulling my hair out on this one all day, and I'm hoping someone smarter than me can figure it out.

I'm working on a new design for my site, and I've run into what appears to be a Firefox bug. I am using background-attachment: fixed for a gradient on the <body> element and then I have a full width <div> with another background image at the top of the page. Only in Firefox, there is a small white border at the top of the page and on either side of the <div> background.

I've tried at least a half-dozen different ways of coding the HTML and CSS, and they all produce the same results. Also, the white gap doesn't appear to be there in earlier versions of Firefox (I noticed it in version 6). I even did a clean reinstall of Firefox without any add-ons, and I'm still seeing it. Any ideas on what's causing this? Is my code wrong in some way?

See simplified test case here: http://mygemologist.com/bg-fixed-test.html

Note: This question may be related to: Crazy CSS Issue in Firefox Only - position fixed and background color, but I'm not sure on that.

解决方案

Dominic, see https://bugzilla.mozilla.org/show_bug.cgi?id=677095 for this issue and https://bugzilla.mozilla.org/show_bug.cgi?id=677095#c47 for a possible workaround.

这篇关于火狐背景附件:固定的噩梦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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