I want to have a fixed position background image that covers the whole screen only for a section of my website (actually two sections, but independently, so there is no
I found this :
.bg {
background: url(image.jpg);
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
height: 100%;
width: 100%;
position: fixed;
background-position: center center;
background-repeat: no-repeat;
}
here : https://css-tricks.com/forums/topic/full-page-backgrounds-on-ios-background-size-cover/page/3/
basically you put your background in another div and give the fixed attribute to the div instead of the background. You need to add z-index:-1; and add white background or whatever to hide the picture where you don't want to see it.