How to get a parallax scroll effect with images?
.wrapper {
height: 100vh;
}
.parallax-img {
background-image: url('https://placehold.it/1220x1060');
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
height: 100%;
}
<div class="wrapper">
<div class="parallax-img"></div>
<p>
/* fill with a looot of text */
</p>
</div>
<div class="wrapper">
</div>
September 4th, 2019
A simple css only way to get a parallax effect for images.