html5+css3的动态背景 登陆页面

html5+css3的动态背景 登陆页面

在这里插入图片描述


style.css

 *{  
            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;  
        } 
/*video背景*/

/*a {
	display: block;
	text-align: center;
}*/
/*水平居中,也可以用center双标签代替*/

.center2 {
    position: absolute;
    width: 300px;
    height: 200px;
    /*background: #ccc;*/
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
/*垂直居中class="center"*/

login.html
如果只是单纯的实现该文章,id可以不写

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
    <video id="v1" autoplay loop muted>
      <source src="video/video1.mp4" type="video/mp4"  />
    </video>
    <center class="center2">
        <input type="text" class="form-control" id="username"
                placeholder="Username" style="height:20px;width:200px"><br/>
        <input type="password" class="form-control" id="inputPassword3"
                placeholder="Password" style="height:20px;width:200px"><br/>
        记住? 忘记密码?<br/>
        <input type="button" value="LOGIN" style="height:20px;width:200px">
    </center>
      <div><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=0 height=0 src="//music.163.com/outchain/player?type=2&id=1352427676&auto=1&height=66"></iframe></div>
</body>
</html>

最后弄一个video1.mp4,放到video文件夹…

发布了10 篇原创文章 · 获赞 4 · 访问量 759

猜你喜欢

转载自blog.csdn.net/weixin_43701595/article/details/103495227
今日推荐