CSS3背景大小不工作,但VISIBLE在Firebug - Firefox 3.6 [英] CSS3 Background-size Not working but VISIBLE in Firebug - Firefox 3.6

查看:121
本文介绍了CSS3背景大小不工作,但VISIBLE在Firebug - Firefox 3.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用新的CSS3规格背景大小有背景图片稍微溢出的页面大小。它在webkit(Chrome和Safari)中工作正常,但-moz-background-size属性在Firefox中根本不工作。不寻常的是,如果您查看网站实时,使用Firebug查看网站时显示-moz-background-size属性 IS ! FF文档表示它支持从3.6和我运行3.6。

I'm using the new CSS3 spec "background-size" to have a background image that slightly overflows the size of the page. It's working fine in webkit (Chrome & Safari) but the "-moz-background-size" property is not working at all in Firefox. The unusual thing is, if you view the site live, the "-moz-background-size" property IS showing when viewing the site with Firebug! The FF docs say that it is supported as of 3.6 and I'm running 3.6.

这是我的代码:

@media screen and (max-width: 1150px) { 
/* special sytles for browser windows less than 1150px */
body{
    -o-background-size: 130%; -webkit-background-size: 130%; -khtml-background-size: 130%; -moz-background-size: 130%;
    background-size: 130%;
}
#trans_fake{
    -o-background-size: 130%; -webkit-background-size: 130%; -khtml-background-size: 130%; -moz-background-size: 130%;  
    background-size: 130%;
}
}

任何调试建议?

EDIT
现在我更加困惑... QuirksMode.org报告了一个白色框,而不是红色或绿色,表示css3背景Firefox 3.6中的基于百分比的兼容性:(
http://www.quirksmode.org/ css / background.html

推荐答案

这是一个CSS错误,我有一个

This turned out to be a CSS mistake on my part, I had a

body{
background:url() top center no-repeat;
}

后面的页面,这是在某种程度上超越了Firefox-moz-background-size:130%有麻烦,给予

later down the page which was somehow overridding the Firefox "-moz-background-size: 130%". So, if you're having trouble, give

body{
background-size: 130% !important;
}

可能会解决这个问题。

这篇关于CSS3背景大小不工作,但VISIBLE在Firebug - Firefox 3.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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