简体   繁体   中英

Android not scaling viewport

This viewport is scaling down perfectly for iphones but it does nothing right but preventing the user to zoom on the site for android phones.

The site has 1080px width, how can I scale it down to 320px correctly?

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<meta name="HandheldFriendly" content="true" />

我会说使用css克服了这个问题,我也遇到了同样的问题,我使用css对其进行了排序,这的确意味着要进行更多的css编码,但是我认为这将是您在IOS和android工作中更容易的选择,我发现它更容易担心IOS,因为它们与Android的桌面浏览器标准相去甚远

Try setting scalable to NO rather than 0;

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

this usually works for me.

Steve

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM