一、效果
![请添加图片描述](https://i-blog.csdnimg.cn/blog_migrate/9cc8b7726909eab6b8a2314ee9365f93.gif)
二、直接上代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0px;
padding: 0px;
}
video {
position: fixed;
right: 0px;
bottom: 0px;
min-width: 100%;
min-height: 100%;
height: auto;
width: auto;
/*加滤镜*/
/*filter: blur(15px); //背景模糊设置 */
/*-webkit-filter: grayscale(100%);*/
/*filter:grayscale(100%); //背景灰度设置*/
z-index: -11
}
source {
min-width: 100%;
min-height: 100%;
height: auto;
width: auto;
}
</style>
</head>
<body>
<video id="v1" autoplay loop muted>
<source src="./assets/images/banner1.mp4" type="video/mp4" />
</video>
<h1 style="color:white">123465</h1>
</body>
</html>