Recently I came into and issue. I checked background size on Chrome devtools and it looked okay:
background on the Chrome iPhone simulator

But then when I looked on the iPhone gadget: background looked horribly, it was zoomed:

background on the Chrome iPhone simulator

After a small search I found explanation (http://caniuse.com/ – feat=background-attachment) . By the fact that mobile browser does not support background-attachment: fixed property. So Chrome devtools(51.0.2704.106 (64-bit) not always help to test your page on mobile browser properly.

This is code of example page:











test


















So to solve the issue I needed to set background-size: 100% to set image to fit screen width.

Leave a Reply

Your email address will not be published. Required fields are marked *