This is a good question. It took me a while to figure out what is going on.
Bootstrap carousel uses transform: translateX();
to do its animating.
.carousel-item-next:not(.carousel-item-left),
.active.carousel-item-right {
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
.carousel-item-prev:not(.carousel-item-right),
.active.carousel-item-left {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
Transform translate will move the fixed background image left or right, regardless if the background is fixed. Unlike position or anything else, the background image stays fixed where ever the element moves. It's a bummer.
I tried to hack it for ages, by putting an extra div with an extra child div for the background, but I could not get my head round the classes. I was trying to reverse translate the background image when the slide is transitioning to give the effect of it being fixed, but then the background image on the next slide needs to not animate. Very confusing. Not sure how this can be done with a slider that uses translate to do its animating. https://www.codeply.com/go/vzVI1YkwYc
Maybe someone clever can figure this one out.