开发者

Android browser scaling?

开发者 https://www.devze.com 2022-12-27 06:14 出处:网络
I\'m trying to create a mobile website for android. When I set the width of the body to 48开发者_StackOverflow0px (the width of the screen) the result is about 50% larger than what I expect. It seems

I'm trying to create a mobile website for android. When I set the width of the body to 48开发者_StackOverflow0px (the width of the screen) the result is about 50% larger than what I expect. It seems that android is scaling what it draws and messing up all my layouts. Does anyone know how to disable this, or work around it?

I'm already using this:

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


You're missing the secret new Android-only viewport property "target-densityDpi" which you can use to configure browser scaling. See the linked question for more details.


A device running Android does not necessarily have a screen width of 480 Pixel. Don't set a fixed width at all.

0

精彩评论

暂无评论...
验证码 换一张
取 消