HTML视频全屏播放背景

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mico_cmm/article/details/79507299

全屏的视频播放用作背景。

<!-- video全屏背景 -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>video scream background</title>
	<style type="text/css">
		*{  
            margin: 0px;  
            padding: 0px;  
        }  
        video{  
            position: fixed;  
            right: 0px;  
            bottom: 0px;  
            min-width: 100%;  
            min-height: 100%;  
            height: auto;  
            width: auto;  
            /*加滤镜*/  
            /*-webkit-filter: grayscale(100%);*/  
            /*filter:grayscale(100%);*/  
        }  
        source{  
            min-width: 100%;  
            min-height: 100%;  
            height: auto;  
            width: auto;  
        }  
	</style>
</head>
<body>
	<video autoplay="autoplay" loop="loop">  
   	 	<source  src="v.mp4" type="video/mp4" >;  
	</video> 
</body>
</html>

猜你喜欢

转载自blog.csdn.net/mico_cmm/article/details/79507299