dxb-parallax
Version:
A vanilla JavaScript parallax scrolling plugin, a port of Ian Lunn’s jQuery Parallax v1.1.3
30 lines (26 loc) • 454 B
CSS
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
}
.normal-section img {
width: 100%;
}
.wrapper {
box-sizing: border-box;
overflow: visible;
position: relative;
}
.parallax-section {
background-image: url('https://placecats.com/millie_neo/1920/1080');
height: 50vh;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
position: relative;
z-index: -1;
}