如何禁用页面缩放/缩放在Android? [英] How to disable web page zooming/scaling on Android?

查看:241
本文介绍了如何禁用页面缩放/缩放在Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一个小的web应用程序收集一些数据,并将其存储在一个中央数据库。我走动,读值并键入他们到一个网站上我的Andr​​oid智能手机。这只是我,所以没有公共可用性问题适用于这个时候。

I have written a small web app to collect some data and store it in a central database. I'm walking around, reading values and typing them into a web site on my Android smartphone. It's just for me, so no public usability concerns apply this time.

现在我想添加一个按钮来增加一个读书用的,我需要能够推动该按钮几次。但是,如果我做的太快,浏览器承认双卡和规模/缩放到页面中。

Now I want to add a button to increment a reading by one, and I need to be able to push that button several times. But if I do it too fast, the browser recognises a double-tab and scales/zooms into the page.

我添加了一个视头已经玩得每个值的组合,我可以在网上找到。但网页仍然可扩展性。如何才能停止呢?

I have added a viewport header already and played with every value combination I could find on the web. But the page remains scalable. How can I stop that?

下面是一个最小的测试页失败对我来说:

Here's a minimal test page that fails for me:

<!doctype html>
<html>
<head>
<title>Test page</title>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<style type="text/css">
body
{
    font: 16pt sans-serif;
}
</style>
</head>
<body>
This is a test page. It should not be scalable by the user at all. Not with the two-pinger pinch gesture and even less with a double-tap on the text.
</body>
</html>

添加初始规模= 1,最大尺度= 1和各种目标whateveritwas-DPI不会改变任何事情。我已经重新启动浏览器(海豚高清和股票的浏览器),并清除高速缓存中了。我在Android 2.2系统,手机是HTC Desire的。

Adding initial-scale=1, maximum-scale=1 and all sorts of target-whateveritwas-dpi doesn't change a thing. I have restarted the browser (Dolphin HD and the stock browser) and cleared the cache already. I'm on Android 2.2, the phone is an HTC Desire.

推荐答案

这是在Android的浏览器的一个已知的bug:<一href="http://$c$c.google.com/p/android/issues/detail?id=11912">http://$c$c.google.com/p/android/issues/detail?id=11912

It's a known bug in Android browsers : http://code.google.com/p/android/issues/detail?id=11912

这篇关于如何禁用页面缩放/缩放在Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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