iphone (smartphones) css RWD rendering not working

百般思念 提交于 2019-12-12 01:56:06

问题


I made my site responsive using media queries and tested it by resizing my browser and it works fine. I also used a website to see how my page would render on apple devices, specifically iPhones, and the RWD worked. But when I looked at my site on an actual iPhones, or any other smartphone for that matter, it shows the page in "desktop mode"(i.e. not rendered with the media queries). Can someone please explain to me why this is? Sorry I don't have an example but I figured it's a common problem/fix. Thanks guys.


回答1:


The first thing that comes to mind, as I've done it before, is did you forget your viewport tag?

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


来源:https://stackoverflow.com/questions/26447372/iphone-smartphones-css-rwd-rendering-not-working

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