0

My background image is not showing on iOS devices, it becomes grey.

I can't test it on windows and also can't afford to upload every 10 sec a new fix.

I found many different answers on internet, I already tried some but none of them worked for me.

Here is my CSS code:

.img-bg-index {
    background-image: url("../img/Monteurzimmer-BG.jpg");
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center right;
    background-size: cover;
    min-height: 95vh;
    position: relative;
}
Jeroen
  • 1,168
  • 1
  • 12
  • 24
Roman
  • 3,563
  • 5
  • 48
  • 104

1 Answers1

0

The background attachement caused the problem, it seems that it is disabled in safari browsers:

How to replicate background-attachment fixed on iOS

I used a media query and changed the background-attachment to initial on a certain max-width:

@media ( max-width :856px) {
    .img-bg-index {
        background-attachment: initial;
    }
}
Community
  • 1
  • 1
Roman
  • 3,563
  • 5
  • 48
  • 104
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/15043738) – MikkaRin Jan 30 '17 at 11:21
  • there is an answer I thought? Dont use this style because it is disabled in safari browsers – Roman Jan 30 '17 at 11:57