媒体查询不工作在Firefox [英] Media queries not working on firefox

查看:168
本文介绍了媒体查询不工作在Firefox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为这个新技术(响应设计)工作,我讨厌那些我不知道答案的问题,我感到沮丧:/ b / b
$ b

这里是我的代码: http://jsbin.com/ejadej/1



使用最新版本的Chrome浏览器,我可以看到该网站应该如何使用我的代码,而Firefox并没有阅读这个媒体查询

  @media screen和(min-width:960px){
#php-info-title {
background-color:#322E2C;
position:absolute;
left:100px;
bottom:0px;
颜色:白色;
z-index:0;
最大宽度:300px;




$ b $ p $它只是忽略它(如果我删除媒体查询它运作良好,但我不想这样做)。

好奇的是,在其他媒体查询写在上面的那个,Firefox运行良好。 / b>

Firefox是怎么回事?

感谢您的帮助。根据规范,在。如果你没有它,它不是一个有效的 @media 规则。



提交 https://bugs.webkit.org/show_bug.cgi?id=117396 http://code.google.com/p/chromium/issues/detail?id=248043 这是值得的。


I have been working with this new technology for me (Responsive Design) and I hate the problems which I don't know the answer, I get frustrated :/

Here is my code: http://jsbin.com/ejadej/1

With the latest version of Chrome, I see the site how is supposed to be by my code, whilst Firefox isn't reading this media query

@media screen and(min-width: 960px) {
    #php-info-title {
        background-color: #322E2C;
        position: absolute;
        left:100px;
        bottom: 0px;
        color:white;
        z-index: 0;
        max-width: 300px;
    }
}

It's just ignoring it (if I remove the media query it works well, but i don't want to do that).

The curious thing is that with the other media queries written above that one, Firefox works well.

What's going on with Firefox?

Thanks for your help.

解决方案

Per spec, you need a space between the and and the (. If you don't have it, it's not a valid @media rule.

I filed https://bugs.webkit.org/show_bug.cgi?id=117396 and http://code.google.com/p/chromium/issues/detail?id=248043 for what it's worth.

这篇关于媒体查询不工作在Firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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