Granit
Granit

Reputation: 127

Background Image on Chrome and Safari for iOS

Has anyone found a solution for making a background image cover the entire div section on iOS? Code words perfectly on android. I am looking for a CSS solution

background: url('../img/slide/contact_background.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
-ms-background-size:cover;
background-size: cover;

Upvotes: 0

Views: 1181

Answers (1)

mikpou
mikpou

Reputation: 91

Try removing "fixed" since it's probably causing the problem with iOS:

background: url('../img/slide/contact_background.jpg') no-repeat center center;

This should work on both Android and iOS browsers.

There is some more info here (and brief testing shows that it's not better in the iOS8): How to replicate background-attachment fixed on iOS

Upvotes: 4

Related Questions