-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path官网登陆效果.html
47 lines (45 loc) · 1.2 KB
/
官网登陆效果.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{margin: 0;padding: 0;}
#box{width: 400px;height: 300px;margin:100px auto;border:1px solid #000;background: #ccc;-webkit-transform:scale(5,5);opacity:0;display: none;}
</style>
<script>
window.onload=function(){
var oBtn=document.getElementById('btn');
var oBox=document.getElementById('box');
var oClose=document.getElementById('close');
oBtn.onclick=function(){
oBox.style.display='block';
oBox.style.WebkitTransition='1s all ease';
setTimeout(function(){
oBox.style.WebkitTransform='scale(1,1)';
oBox.style.opacity=1;
},0);
}
oClose.onclick=function(){
oBox.style.WebkitTransform='scale(5,5)';
oBox.style.opacity=0;
function trend(){
oBox.removeEventListener('transitionend',trend,false);
oBox.style.display='none';
}
oBox.addEventListener('transitionend',trend,false)
}
}
</script>
</head>
<body>
<a href="javascript:;" id="btn">登陆</a>
<div id="box">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<a href="javascript:;" id="close">X</a>
</div>
</body>
</html>