Multiple background css images (one fixed and the other scroll) displays all as scroll

I have tried with these css and for some reason the second image doesn't display as fixed

.background {
background-image: url(../img/gradient.jpg), url(../img/sky.jpg);
background-attachment: scroll, fixed;
background-repeat: no-repeat, no-repeat;
background-size: cover, cover;    
}

Also tried this way

.backgroundv2 {
background-image: url(../img/gradient.jpg) cover no-repeat scroll, url(../img/sky.jpg) cover repeat fixed;  
}

1 answer

  • answered 2018-07-11 02:47 TranDuc

    try with: background-position

    i.e: background-position: right bottom, left top;