问题与视口元标记 [英] issue with viewport meta tag

查看:178
本文介绍了问题与视口元标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要我的网站根据设备自行调节。我用下面的视区meta标签:

I need my website to adjust itself according to the device. I used the following viewport meta tag:

<meta name="viewport" content="user-scalable=no,width=device-width, height=device-height, minimum-scale=0.1, maximum-scale=0.65" />

它的工作好了iPhone上。但在Android上看起来当我改变刻度值不会回应它在所有偶数。是否有针对Android不同的标记?

It works alright on iPhone. but on android it looks it doesn't responded to it at all even when I change the scale values. Is there a different tag for android?

推荐答案

您应该使用针对Android相同的标记,但也有一些区别不同的平台如何如果没有设置自视口大小,或视大小来计算初具规模。在心中也保持初始规模仅适用于第一次加载页面,如果你重新加载页面,将保留您目前拥有的缩放。

You should use the same tag for Android, but there are a few differences how different platforms calculate initial scale from viewport size, or viewport size if not set. Also keep in mind that initial-scale only works first time you load the page, if you reload the page it will keep the scaling that you currently have.

我不能确定是什么导致你所寻找的,但你必须为Android在这里有很大的参考(的 http://developer.android.com/guide/webapps/targeting.html )和iPhone在这里(<一href=\"http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html\" rel=\"nofollow\">http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html )。

I'm unsure what result you are looking for, but you have a great reference for Android here ( http://developer.android.com/guide/webapps/targeting.html ) and for Iphone here ( http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html ).

此外,您还可以谷歌(我无法张贴,因为低信誉的链接)

Also, you can google for "tale of two viewports" (i was unable to post link because of low reputation)

这篇关于问题与视口元标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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