media queries not working for samsung or ipod

青春壹個敷衍的年華 提交于 2019-12-12 02:13:58

问题


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)

回答1:


Try adding this between your head tags:

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


来源:https://stackoverflow.com/questions/22620285/media-queries-not-working-for-samsung-or-ipod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!