How to scale a website for mobile devices?

前端 未结 2 1792
生来不讨喜
生来不讨喜 2020-12-29 05:01

I\'ve a very simple static web page (only css and links, no scripts). It looks good on android and iphone, but too small. I\'m guessing they put it smaller since it work for

相关标签:
2条回答
  • 2020-12-29 05:38

    Android automatically adjusts to the size of your site, try to use width:100% or smaller than around 310 pixels (scrollbar takes space) for normal viewmode.

    For IPhone try using this code to force the correct size

    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> 
    

    Also to force font-size try to use this code in your css:

    -webkit-text-size-adjust: none;
    
    0 讨论(0)
  • 2020-12-29 05:40
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    

    The list should be comma-separated.

    0 讨论(0)
提交回复
热议问题