我怎么能强迫一个站点扩展到固定移动(iPhone的Andr​​oid ..) [英] How can I force a site to scale to fix for mobile (Iphone android..)

查看:104
本文介绍了我怎么能强迫一个站点扩展到固定移动(iPhone的Andr​​oid ..)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开我的网站在iPhone不会缩小。我所看到的是左上角最几百sqare像素。我是新来的移动优化的,但我觉得最喜欢的页面滚动到自动适应,并且大部分问题似乎是,我有相反的情形(武力手机的没有的按比例缩小)。

我想整个页面宽度为visable并使它所以用户必须放大才能阅读文本。

我曾尝试使用和不使用下面的code的头部,但没有明显的效果。

 < META NAME =视口内容=WIDTH =装置宽度,初始规模= 1.0>

!<  - 我也试过: - >
< META NAME =视CONTENT =WIDTH = 1024,初始规模= 1>
 

解决方案

这里使用的文档:<一href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html">http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html

这似乎是你应该忽略大多数视口属性,只是设置用户可升级为yes。它的工作对我的iPhone了。

 &LT; META NAME =视CONTENT =用户可升级= YES&GT;
 

:移动通信测试仪现场不允许缩放,所以它只是给滚动条。随着实际的电话工作的。

When I load my site in an iphone it doesn't scale down. All I see is the top-left most couple hundred sqare pixels. I am new to mobile optimization, but I feel like most pages scroll to fit automatically, and most questions seem to be for the opposite scenario that I am having (force phone not to scale down).

I would want the whole page width to be visable and to make it so the user would have to zoom in to read the text.

I have tried with and without the following code in the head, but with no apparent effect.

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

<!--  I Also tried: -->
<meta name="viewport" content="width=1024, initial-scale=1">   

解决方案

Using the docs here: http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html

It seemed like you should ignore most of the viewport properties and just set user-scalable to "yes". It's working on my iphone now.

<meta name="viewport" content="user-scalable = yes">

Edit:: The mobile tester site doesn't allow scaling, so it just gives scrollbars. With an actual phone this works.

这篇关于我怎么能强迫一个站点扩展到固定移动(iPhone的Andr​​oid ..)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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