是否可以通过Javascript在Mobile Safari中更改页面缩放? [英] Is is possible to change page zoom in Mobile Safari via Javascript?

查看:121
本文介绍了是否可以通过Javascript在Mobile Safari中更改页面缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用jquerymobile的网站.它会加载一个初始网页,然后在单击其他页面时,将它们加载到顶部的叠加层"中.

I have a site using jquerymobile. It loads an initial webpage, and then as other pages are clicked, they are loaded in an "overlay" which slides over the top.

就像这样: http://jquerymobile.com/demos/1.0a4/

..除了我的启用了捏缩放功能.

..except mine has pinch zoom enabled.

我希望缩放状态在用户看到的每个页面上都是独立的.因此,如果用户从第一页开始,打开一个叠加层",放大,然后关闭叠加层",我希望第一页重置为原始缩放级别.

I want the zoom state to be independent on each page the user sees. So, if a user starts on page one, opens an "overlay", zooms in, and then closes the "overlay" -- I want the first page to reset to the original zoom level.

这可能吗?

推荐答案

没有办法控制浏览器缩放.您应该使用JavaScript来缩放(或缩放)浏览器中的对象.最好通过将user-scalable设置为no

No there is no way to control browser zoom. You should use JavaScript to zoom (or scale) your objects in the browser. It's best to switch pinching off by setting user-scalable to no

这篇关于是否可以通过Javascript在Mobile Safari中更改页面缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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