iOS / Safari Web App图像缩放 [英] iOS/Safari Web App Image Zoom

查看:153
本文介绍了iOS / Safari Web App图像缩放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我正在开发的网络应用中,我希望用户能够捏合放大和缩小高分辨率图像。客户希望这可以在iPad上运行,但最好是多平台。

On a web-app I am developing I would like the user to be able to pinch zoom in and out of a high resolution image. The client would like this to work on iPads, but it would be best if it was multi platform.

我的计划是以1000px x 1000px创建图像并显示它在页面上以100px x 100px(例如)使用CSS。然后用户可以放大和缩小图像以更详细地查看它。

My plan was to create the the image at 1000px x 1000px and display it on the page at 100px x 100px (for example) using CSS. The user would then be able to zoom in and out of the image to see it in greater detail.

我注意到当你放大图像时,尺寸增加但细节不会因为Safari在渲染页面时调整图像大小。有什么办法可以解决这个问题吗?

I've noticed that when you zoom into the image, the size increases but the detail doesn't as it appears that Safari resizes the image upon rendering the page. Is there anything I can do to get around this?

推荐答案

您可以尝试添加以下代码

You can try adding the following code

< meta name =viewportcontent =initial-scale = 0.1; maximum-scale = 1.0; user-scalable = yes >

尝试使用各种比例值,直到达到你想要的确切值。
希望能帮到你..

Try playing around with various values for the scale until you hit the exact thing you want. Hope that helps you..

这篇关于iOS / Safari Web App图像缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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