媒体查询不适用于三星或ipod [英] media queries not working for samsung or ipod

查看:75
本文介绍了媒体查询不适用于三星或ipod的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使我的网站具有响应性,但是我有一些问题. 在我的浏览器上工作正常.如果我的浏览器是全屏的,那么它看起来应该是应该的,如果我缩小浏览器,则媒体查询可以完美地工作. 但是,如果我随后将其加载到三星银河S3或iPod touch上,则不会.看起来像常规网站,只是塞得更小以适合屏幕.它确实适合100%的屏幕,但是却像它应有的那样热. 我已经在这里搜索了答案.我尝试更改宽度,尝试将px更改为em.我尝试过不那么具体,只是为便携式设备写东西.仍然无法正常工作. 有人可以帮忙吗? 这是我的媒体查询.

Im trying to make my website responsive, however Im having a little problem. It works fine on my browser. If my browser is full screen then it looks how it should, and if I make the browser smaller then the media queries work perfect. However if i then load onto a samsung galaxy S3 or ipod touch, it does not. It looks like the regular website, only crammed in smaller to fit the screen. It does fit 100% of the screen, however hot at all like it should. I have searched through here for an answer. I have tried changing the widths, I have tried changing px to em. I have tried being less specific and just write for portable devices. Still doesnt work. Can anyone help? This is my media query..

@media only screen and (min-width: 150px) and (max-width:600px)

推荐答案

尝试在您的head标签之间添加此标签:

Try adding this between your head tags:

<meta name="viewport" content="width=device-width, initial-scale=1">

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

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