I've recently integrated the jquery.videoBG plugin into my project to add a video background.
Here's the HTML code:
<div id="div_demo">
<div class="videoBG">
<video autoplay="" src="media/snow.mp4" style="position: absolute; z-index: 0; top: 0px; left: 0px; min-width: 100%; width: 100%; height: 650px; loop">
</video>
</div>
</div>
CSS:
#div_demo{
position: relative;
min-height: 650px;
}
Currently, I have set the video styles inline. However, I'm facing an issue where applying height to the video causes its width to shrink and become aligned in the center.
If I remove the height attribute from the video, it goes outside of the containing div.