- 完成《个人相册》项目登录页面
要求:
1. 使用正则表达式验证邮箱
2. 密码长度至少为6位且为字母与数字的组合
<!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: 0;
padding: 0;
}
html {
height: 100%;
width: 100%;
overflow: hidden;
margin: 0;
padding: 0;
background: url(img/1.jpg) no-repeat 0px 0px;
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
}
:root{
height: 100%;
}
body{
height: 100%;
perspective: 2000px;
transform-style: preserve-3d;
}
.userInfo{
width: 100%;
height: 30px;
line-height: 30px;
color: white;
background: grey;
}
.mynav{
float: right;
}
.myherf{
text-decoration:none;
line-height: 30px;
color: white;
}
div.photo{
width: 250px;
height: 250px;
position: absolute;
left: 50%;
top: 40%;
transform: translate(-50%,-50%);
transform-style: preserve-3d;
animation: run 10s linear infinite;
}
@keyframes run{
0%{
transform: translate(-50%,-50%) rotateY(0deg);
}
100%{
transform: translate(-50%,-50%) rotateY(360deg);
}
}
img{
width: 250px;
position: absolute;
opacity: 0.99;
backface-visibility: visible;
/* 默认值为visible,即能看见3d画面的背面,hidden看不见 */
}
img:nth-of-type(1){
transform: rotateY(45deg) translatez(450px);
}
img:nth-of-type(2){
transform: rotateY(90deg) translatez(450px);
}
img:nth-of-type(3){
transform: rotateY(135deg) translatez(450px);
}
img:nth-of-type(4){
transform: rotateY(180deg) translatez(450px);
}
img:nth-of-type(5){
transform: rotateY(225deg) translatez(450px);
}
img:nth-of-type(6){
transform: rotateY(270deg) translatez(450px);
}
img:nth-of-type(7){
transform: rotateY(315deg) translatez(450px);
}
img:nth-of-type(8){
transform: rotateY(360deg) translatez(450px);
}
</style>
</head>
<body>
<div>
<div class="userInfo">
欢迎你,张三!
<nav class="mynav">
<a href="#" class="myherf">个人信息</a>
<a href="#" class="myherf">退出</a>
</nav>
</div>
<div class="photo">
<img src="img/3.jpg" alt="">
<img src="img/2.jpg" alt="">
<img src="img/3.jpg" alt="">
<img src="img/4.jpg" alt="">
<img src="img/2.jpg" alt="">
<img src="img/3.jpg" alt="">
<img src="img/4.jpg" alt="">
<img src="img/2.jpg" alt="">
</div>
</div>
<script>
document.body.onmousemove = function(e){
this.style.perspectiveOrigin = ""+e.pageX+"px "+e.pageY+"px";
}//鼠标当前点为视角所在方位
</script>
</body>
</html>