Closed VadymVolos closed 8 years ago
Got it finally work. You need a Wrapper with relative positioning and an inner div element with position absolute and z-index -101. Inside the wrapper and below the background div you can set the parallax div.
HTML:
<div class="wrapper">
<div class="adding-background"></div>
<div class="parallax-window" data-parallax="scroll" data-image-src="http://www.bilder-upload.eu/upload/e8cafb-1447932765.jpg"></div>
</div>
CSS:
.wrapper {
position: relative;
}
.adding-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -101;
height: 220px;
background: rgb(248,197,91);
}
.parallax-window {
height: 220px;
background: transparent;
width: 50%;
margin: 0 auto;
}
See working fiddle: http://jsfiddle.net/5rnk6k2u/
Hi!
style.css
index.html