【发布时间】:2017-06-03 16:19:00
【问题描述】:
我一直试图在我的计算机上制作视频作为背景视频。我的视频标题为“runbg.avi”,它与我的 HTML 和 CSS 文件位于同一文件夹中。
这是我为寻找答案而访问的众多网站中的几个。
Using file:// instead of http:// when trying to get video from my computer rather than the web.
I can point to video on the web but not locally.
到目前为止我的程序。
/* 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>
【问题讨论】:
-
这里有问题吗?
-
如何链接到本地视频文件?
-
你错过了 元素吗??
标签: html css video background html5-video