响应式设计-Media Query无法在iPhone上运行? [英] Responsive design - Media Query not working on 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">
这篇关于响应式设计-Media Query无法在iPhone上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!