Firefox中的疯狂CSS问题 - 固定位置和背景颜色 [英] Crazy CSS Issue in Firefox Only - position fixed and background color

查看:244
本文介绍了Firefox中的疯狂CSS问题 - 固定位置和背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅此链接:

http ://lsp2.tpdserver2.co.uk/test.htm



IE / Chrome显示效果不错,但Firefox(6.0.1)如果我为#header-content添加一个背景颜色,那么1px的白色边框就消失了。这似乎是疯狂的。

我不能解决这个问题,我试图建立的相关页面取决于没有第二个固定容器的背景颜色。



这是我看到的问题的一个图像:

链接图片 解决方案

这是Firefox中的布局渲染错误。这个bug已经被报告了,据我所知在下一个版本中已经修复了。我只知道解决方案是使用 opacity:0.9999999 。它会正确渲染为不透明:1,但修复这个恼人的bug。

尝试 #header {opacity:0.9999999; }



Bugzilla:错误677095 编辑:火狐8不受这个bug的影响,并设置不透明度为0.9999999将导致怪异的边界元素,所以我不想再使用它了

See this link:

http://lsp2.tpdserver2.co.uk/test.htm

Displays fine in IE/Chrome but in Firefox (6.0.1) there is a 1px border around the blue header.

If I add a background color to the #header-content, the 1px white border dissapears. This seems crazy.

I cannot work out what is going on with this and the related page I am trying to build depends on not having a background colour for the 2nd fixed container.

Here is an image of the problem I see:

Link to Image

解决方案

It is layout rendering bug in Firefox. This bug was already reported and as I know it is fixed in next release. Only solution I know is to use opacity:0.9999999. It would render correctly as opacity:1, but fix this annoying bug.

Try #header { opacity:0.9999999; }

Bugzilla : Bug 677095

EDIT: Firefox 8 is not affected with this bug and setting opacity to 0.9999999 will result in weird border around the element, so I prefer not to use it anymore

这篇关于Firefox中的疯狂CSS问题 - 固定位置和背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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