3

I have a canvas element that is 608 pixels wide and am trying to get both the iPhone and iPad to zoom-in so that this fills the screen.

I have been experimenting with various values but none seem to work on both devices. Here is what I currently have (works on iPhone but looks small on iPad):

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

How can I achieve this?

4

2 回答 2

3

解决了,需要确保最小和最大比例设置正确,否则会受到限制!

<meta name="viewport" content="width=608, maximum-scale=1.5, user-scalable=no" />
于 2012-05-14T04:02:48.793 回答
0

您可能想尝试:

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

或者您可能需要使用 javascript 来获取当前视口比例,这篇文章可能会有所帮助: http ://menacingcloud.com/?c=viewportScale

于 2012-05-13T23:39:32.353 回答