响应式设计-Media Query无法在iPhone上运行? [英] Responsive design - Media Query not working on iPhone?

查看:98
本文介绍了响应式设计-Media Query无法在iPhone上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建网站的移动友好版本,以使我的网站能够响应较小的屏幕尺寸并相应地缩放.

I am trying to create a mobile friendly version of my website, to make my website responsive to a smaller screen size and scale accordingly.

我创建了一些媒体查询,这些查询在桌面上调整大小时在浏览器中可以正常运行.

I've created some media queries, that behave correctly in a browser when resizing on a desktop.

在我的iPhone上,野生动物园只是缩小了整个网站的面积,但仍保持了完整尺寸网站的长宽比.如何获取媒体查询?我错过了什么吗?

On my iPhone, safari just shrinks the entire website but still maintains the aspect ratio of the full sized site. How do I get the media query to be observed? have I missed something?

这里是指向沙盒的链接,我正试图使其正常工作-感谢您的帮助或建议:

Here is a link to a sandbox which I am trying to get working correctly - any help or suggestions are appreciated:

http://www.preview.brencecoghill.com/

推荐答案

您的html中是否包含用于查看端口的元?

Do you have the meta for view port in your html?

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

此处的更多信息: http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-dont-forget-the-viewport-meta-tag/

这篇关于响应式设计-Media Query无法在iPhone上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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