galaxy S3.. viewport meta tag doesns't work

谁说我不能喝 提交于 2019-12-08 03:18:45

问题


I'm currently working on the web app which use medium-dpi in viewport meta tag like the below.

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,
      width=device-width, user-scalable=no, target-densitydpi=medium-dpi" />

When I test it on a galaxy S3 device, viewport seems not work correctly.

I saw this kind of thing in Android 4.0.2. In android 4.0.2, i heard android OS itself has bug that can't apply the viewport correctly.

Anybody has any idea??


回答1:


I actually found an important clue.

http://developer.android.com/guide/webapps/targeting.html

" values less than (or equal to) 320 result in a value equal to the device-width "

So, Doing "Width=320", a typical setting it migrating from the IPhone, it does not seem to work.

Set it to 321, and it works!

Tested on galaxy s3, playbook, galaxy note



来源:https://stackoverflow.com/questions/11532642/galaxy-s3-viewport-meta-tag-doesnst-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!