I'm remodeling the help center, but I'm encountering a difficulty with the iPhone-only homepage background. On Android and desktop everything works correctly, but on iPhone the image is stretched. Since the property background-attachment: fixed; Doesn't work on iPhone. But how can I get it to work correctly on all iPhones?
CSS Code
.bg-community {
background-image: url($community_background_image);
}
.bg-home {
background-image: url($homepage_background_image);
background-position: center center;
background-attachment: fixed;
background-size: cover;
background-repeat: no-repeat;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3),
only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3),
only screen and (min-device-width: 390px) and (max-device-height: 844px) and (-webkit-min-device-pixel-ratio: 3),
only screen and (min-device-width: 428px) and (max-device-height: 926px) and (-webkit-min-device-pixel-ratio: 3) {
.bg-home {
background-image: url(($homepage_background_image);
Position:fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
}