I'm currently in the process of developing a website with different background images that change as you scroll down. However, I've encountered an issue where each background image does not completely cover the screen height. In order to make them fit the whole screen, I have to set them to 1100px which results in only part of the image being displayed when scrolling down. My goal is to have the background images fill 100% of the screen height without being cut off or extending beyond the page.
.container {
background-size: 100%;
background-size: cover;
margin-top: 1vh;
}
.parallax {
background: url("quem-somos.png") ;
background-size: cover;
width: 100%;
height: 100%;
}
.parallax2{
background: url("servicos.png") no-repeat center;
background-size: cover;
height: 1100px;
width: 100%;
background-attachment: scroll;
}
.parallax3{
background: url("depoimentos.png") no-repeat center;
background-size: cover;
height: 1100px;
width: 100%;
background-attachment: scroll;
}
.parallax4{
background: url("comecando.png") no-repeat center;
background-size: cover;
height: 1100px;
width: 100%;
background-attachment: scroll;
}
.parallax5{
background: url("sac.png") no-repeat center;
background-size: cover;
height: 1000px;
background-attachment: scroll;;
width: 100%;
}
.parallax6{
background: url("onde-atuamos.png") no-repeat center;
background-size: cover;
background-attachment: scroll;
height: 1000px;
width: 100%;
}
All of the images are placed within the container
<div class="container">
<div class="parallax" id="about">
</div>
<div class="parallax6" id="operations">
</div>
<div class="parallax2" id="services">
</div>
<div class="parallax3" id="testimonials">
</div>
<div class="parallax4" id="getting-started">
</div>
<div class="parallax5" id="support">
</div>
</div>