I've hit a roadblock while attempting to set a video on my computer as the background. The video file is named "runbg.avi" and it resides in the same folder as my HTML and CSS files.
After scouring through numerous websites, I encountered a couple of potential solutions:
One suggestion was to use file:// instead of http:// when referencing videos stored locally.
Another advice mentioned that pointing to videos hosted online works fine but having them play from local sources can be tricky.
This is what I have worked on so far:
/* BACKGROUND */
video#vid {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
background-size: cover;
margin: 0 auto;
}
<!DOCTYPE html>
<head>
<title>Seb's Fitness</title;
<link rel = "stylesheet"
type = "text/css"
href = "css.css" />
<video autoplay loop poster="" id="vid">
<source src="file://runbg.avi" type="video/avi">
</video>