Is there a simple method to switch out a full-page image background with a video?
video {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
transform: translateX(-50%) translateY(-50%);
background: url('#.jpg') no-repeat;
background-size: cover;
transition: 1s opacity;
}
<video poster="#.jpg" id="bgvid" playsinline autoplay muted loop>
<source src="#.mp4" type="video/mp4">
</video>
I'm using the Spectral template from HTML5 UP, but I'm struggling to replace the banner background with a video in a straightforward and effective way. ()
Appreciate your help in advance :-)