I am working on a website where I have to place 3 background videos and apply parallax effect in different sections of the web, in the first section I have put the background video and it is reponsive and I have no problem, the problem it comes when I'm going to put the other videos, if I want the parallax effect, it overlaps me with the first one, if I give it a minor z-index, it does not look like it pq covers it first.
What attributes should I put or take into account in the CSS when doing this?
/*Aqui el primer video*/
.home {
width: 100%;
height: 100vh;
background: url(img/rtlCD.jpg);
background-size: cover;
background-position: center center;
position: relative;
display: block;
justify-content: center;
align-items: center;
background-attachment: fixed;
}
#videoRtl{
position: fixed;
min-width: 100%;
min-height: 100%;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
/*Aqui el segundo video*/
.containerShop{
width: 100%;
height: 80vh;
background: url(img/rtlCD.jpg);
background-size: cover;
background-position: center center;
position: relative;
display: block;
justify-content: center;
align-items: center;
background-attachment: fixed;
}
#videoRtl2{
position: absolute;
width: auto;
height: auto;
max-width: 100%;
min-height: 100%;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Retrace The Lines</title>
<link rel="icon" type="image/png" sizes="16x16" href="css/img/FAVICON/logo16.png">
<link rel="icon" type="image/png" sizes="32x32" href="css/img/FAVICON/logo32.png">
<link rel="icon" type="image/png" sizes="96x96" href="css/img/FAVICON/logo96.png">
<link rel="icon" type="image/png" sizes="192x192" href="css/img/FAVICON/logo192.png">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<script src="js/core.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="js/jquery.stellar.js"></script>
<script>
$.stellar();
</script>
</head>
<body>
<div id="menuContainer">
<nav id="menu">
<ul>
<a href="#rtl"><li>o</li></a>
<a href="#meetUs"><li>o</li></a>
<a href="#videos"><li>o</li></a>
<a href="#tourDates">o<li></li></a>
<a href="#shop"><li>o</li></a>
<a href="#music"><li>o</li></a>
<a href="#contact"><li>o</li></a>
</ul>
</nav>
</div>
<!--End menuContainer-->
<section id="containerRtl" class="home" data-stellar-background-ratio="0.5">
<video id="videoRtl" src="css/vid/Test01.mp4" autoplay loop muted></video>
<div id="logo">
<img id="img1" src="css/img/RtlLogoBlanco.png"/>
</div>
<div id="container1">
<div id=container1Shop>
<a href="#"><p>GET IT HERE</p></a>
</div>
<br/>
<div id="containerScrollButton">
<img id="img2" class="img2" src="css/img/295892-0-scrollDown.png"/>
</div>
</div>
</section>
<!--End containerRtl-->
<section id="containerShop" class="containerShop" data-stellar-background-ratio="0.5">
<video id="videoRtl2" src="css/vid/RTL_Cube_web_3.mp4" autoplay loop muted></video>
<h1 id="titleRtl"><span class="azul">"DEPARTURES / ARRIVAL"</span>
<br/>
<span class="normal">Official Store</span></h1>
<div id="container2">
<a href="#">GO TO SHOP</a>
</div>
</section>
In the code I've put it that way, pq works but I can not get the parallax effect and the video does not run "responsive", with the first I have no problem.
Thank you very much