媒体查询不在Safari或Chrome中工作。在Firefox中工作正常 [英] media queries not working in safari or chrome. working fine in firefox

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

问题描述

http://timenoplace.com/releases/



这是我正在处理的网站。



媒体查询在firefox中完美运行,而不是在safari或chrome中。



在960以下 - 你会看到在Firefox中的背景变成黄色,但在safari和铬,变化不注册。

我以前从来没有这个问题。这是令我疯狂的。

在网上找不到任何东西...有没有人有任何想法? css验证...



该项目是我为wordpress构建的主题。这可能与这件事有什么关系吗?

谢谢你。

解决方案

在你的style.css的第282行中,你有一个 @media screen {没有关闭}的块 。添加结束括号后的媒体屏幕的CSS规则(1320行) - 这应该做的伎俩。



我猜firefox不像chrome和safari,对语法也不太挑剔。

http://timenoplace.com/releases/

this is a site i am working on.

media queries are working perfectly in firefox and not in safari or chrome.

if you drop the width to below 960 - you will see the background turn yellow in firefox... but in safari and chrome, the changes do not register.

i have never had this problem before. it is driving me insane.

can't find anything online ... does anyone have any ideas ??? css validates...

the project is a theme i built for wordpress. could that have anything to do with this?

thank you.

解决方案

in your style.css on line 282, you have a block for @media screen { without a closing }. Add the closing bracket after your css rules for the media screen (line 1320) - that should do the trick.

I guess firefox, unlike chrome and safari, isn't too picky about syntax.

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

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