本文介绍了Android和webOS的任何内容缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,伙计们,
我目前正在建设一个网站为移动设备优化。

hey guys,i'm currently building a website optimized for mobile devices.

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>

我有一个动态的JavaScript网格,我想在移动设备上不结垢。
上面的线完美的作品对iPhone但我认为它不会在Android或webOS的工作。任何想法如何,我可以设置一个没有大规模模式的移动设备也是如此。因此,有没有掐&安培;放大和设备宽度是100%的浏览器的宽度?

i have a dynamic javascript grid and i want no scaling on mobile devices.the line above works perfectly on the iphone however i think it does not work on android or webos. any idea how i can set a NO-SCALE mode for those mobile devices as well. So there is no pinch & zoom and the device-width is the 100% browser-width?

谢谢你的提示。

关于亚光

推荐答案

据http://developer.android.com/guide/webapps/targeting.html#Metadata, 用户可扩展的属性需要被设置为无,不为0.所以:

According to http://developer.android.com/guide/webapps/targeting.html#Metadata, the "user-scalable" property needs to be set to "no", not 0. So:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>

修改:靠近页面在Safari参考图书馆 - 支持Meta标签:

用户可扩展结果
  判断是否用户可以
  放大和缩小,是否
  用户可改变的规模
  视口。设置为允许缩放
  和没有不允许缩放。该
  默认值是

设置用户可扩展没有
  $ P $从滚动时pvents网页
  在输入字段中输入文本。

Setting user-scalable to no also prevents a webpage from scrolling when entering text in an input field.

在可用的iOS 1.0及更高版本。

Available in iOS 1.0 and later.

这篇关于Android和webOS的任何内容缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 01:53
查看更多