Paul Paul - 1 year ago 161
Sass (Sass) Question

background image won't show on tablet and mobile phone

The background image shows perfectly on PC and simulator (tablet and phone), but it won't show on actual phone/tablet.


div#photo_break {
@include viewport-unit(height, 28vw);
background-image: url('<img>');
background-repeat: no-repeat;
background-size: 100% auto;
-webkit-background-size: 100% auto;
-moz-background-size: 100% auto;
-o-background-size: 100% auto;
background-position: center top;
background-attachment: fixed;
z-index: 99999;


As you can see in this picture, in
Chromes simulator
the picture is shown.

picture showing that in the Chrome simulator it works!

The size of the image is not really large, or is it?

enter image description here

Answer Source

mobileand tablet browsersdo not support background-attachment: fixed.

changing this, solved the problem

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download