Android viewport setting “user-scalable=no” breaks width / zoom level of viewport

后端 未结 3 2121
终归单人心
终归单人心 2020-12-04 16:23

I am working on a web app which has a width of 640px.

In the document head I set

  

        
3条回答
  •  渐次进展
    2020-12-04 16:55

    Trying rendering the viewport meta tag like so:

        
    

    Setting scale settings will set user restrictions on how far they can zoom, and so if you set the initial and maximum to the same amount, this should fix the problem.

    UPDATE: I was able to fix my bug for android devices all together by setting the below:

    
    

    I also noticed that some content, such as p tags were not flowing across the screen, so the hack for that would be to add the background-image property with empty string to any content that is stuck and is not going across the layout view. Hope this helps this time for you.

提交回复
热议问题