iPad iPhone scale background images

后端 未结 4 1006
半阙折子戏
半阙折子戏 2021-01-31 19:41

Just wondering if anyone else has experienced the iPad/iPhone scaling their background images down to fit the view port.

In my case, I\'m swapping out background images

4条回答
  •  旧时难觅i
    2021-01-31 20:27

    First of all, if you export your image as a 32 bit png (I use Fireworks to do so), and use that png in your background instead of a jpg file, IOS won't scale the image. Works like a charm, and the size is about the same as a jpg with 100% quality (slightly smaller actually)

    Also, aditionally for a better experience in ipad / iphone, you should:

    a) set a min with do the body tag (mine is usually 980px)

    body {
        min-width: 980px;
    }
    


    b) set the same width to the viewport meta tag

    
    


    Users should now be able to:
    - see the design as you have created it
    - zoom the content (wich they couldn't if you used "initial-scale=1, maximum-scale=1" on the viewport meta tag)
    - change the device landscape to portrait and vice versa with no issues

提交回复
热议问题