I'm having trouble placing a video underneath a purple layer as the overlay isn't aligning properly with my video.
https://i.sstatic.net/DCzWy.jpg
After removing the background-size: cover;
in the home section, it appears like this:
https://i.sstatic.net/9xCqs.jpg
.videoContainer {}
.videoContainer .overlay { /* ? */
position: fixed;
top: 0;
left: 0;
z-index: 2;
opacity: .5;
}
.videoContainer video {
width: 100%;
position: absolute;
z-index: -1;
}
.home-section {
// background-size: cover;
background-repeat: no-repeat;
background-image: url('?');
z-index: 9999;
}
<div class="home-section section">
<div class="videoContainer">
<video autoplay loop muted>
<source src="?" type="video/mp4">
</video>
</div>
</div>