This website is meant to show you how to easily style an image to have parallax scrolling on your website.
Parallax scrolling is a Bootstrap function that allows for the foreground and background to scroll at different speeds. It enables elements in the foreground to scroll past a fixed image in the background.
1. Create a .parallax class within CSS.
2. Within that class, add the following declarations to the CSS class:
.parallax {3. Create a .parallax-img class:
min-height: [whichever height];
background-attachment: fixed;
background-size: cover;
background-position: 50% 50%;
}
.parallax-img {4. Go into HTML and create a DIV with with the following classes.
background-image: url(insert url here);
}
< div class="container parallax parallax-img bg-primary" >IMPORTANT: Don't forget to add a bg-primary (or another Bootstrap background class) or else your image may not show up. If it doesn't, add an !important command to the .parallax-img class.