当浏览器不支持媒体查询时,会发生什么? [英] What exactly happens when a browser doesn't support media queries?

查看:282
本文介绍了当浏览器不支持媒体查询时,会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用媒体查询建立我的网站,以适应不同的屏幕尺寸。



巧合,我用一台未更新的浏览器检查了我的网站,我得到了移动内容和桌面内容的混合。但是我没有办法看到代码,因为没有firebug或类似的安装。



我的问题是,如果浏览器不接受媒体查询in css?




  • 是否忽略条件内的所有内容?


  • >

    如果浏览器不支持媒体查询,那么没有什么可以忽略条件内的一切。



    如果您要支持,则可以使用此JS http://code.google。 com / p / css3-mediaqueries-js /


    I'm building my site with mediaqueries to adapt to different screen sizes.

    By coincidence I checked my site in an old pc with an unupdated browser and found out that I was getting a mix of mobile content and desktop content. However I didn't have a way to see the code since there was no firebug or similar installed.

    My question is what happens if the browser doens't accept media queries in css?

    • Does it ignore everything inside the condition?

    • Or does it run everything inside the condition whatever the condition is?

    解决方案

    If the browser doesn't support Media Queries then nothing happen it's ignore everything inside the condition.

    If you wanted to support then you can use this JS http://code.google.com/p/css3-mediaqueries-js/

    这篇关于当浏览器不支持媒体查询时,会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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