我怎么能强迫一个站点扩展到固定移动(iPhone的Andr​​oid ..)扩展到、站点、我怎么能、oid

2023-09-05 05:41:18 作者:心都碎成馅儿

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

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

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

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

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

解决方案

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

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

 < META NAME =视CONTENT =用户可升级= YES>
 

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

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.