-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvar.html
More file actions
82 lines (75 loc) · 1.42 KB
/
Copy pathvar.html
File metadata and controls
82 lines (75 loc) · 1.42 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> 生日快乐 </title>
<style>
#main0{
width:100%;
height:195px;
overflow:hidden;
}
#main1{
width:100%;
height:50px;
background:aliceblue;
overflow:hidden;
}
#progress0{
width:0%;
height:49px;
background:red;
}
#progress1{
width:0%;
height:49px;
margin-top:1px;
background:pink;
}
</style>
</head>
<body>
<img id='4.jpg'>
<div id='main0'>
<div id='main1'>
<div id='progress0'>
<div id='progress1'>
</div>
</div>
</div>
<h2 id='zhufu'></h2>
<button id='bid'>生日快乐</button>
</div>
<script>
choose=0;
bid.onclick=function(){
alert('小海祝小姐姐生日快乐');
element=document.getElementById('4.jpg');
xiaozou=document.getElementById('zhufu');
element.height='700';
element.src="4.qxh";
pro=0;
v=1;
pro1=0;
sobj=setInterval(function(){
pro=v;
v+=1;
pro1=pro*0.5+1;
progress0.style.width=pro+'%';
progress1.style.width=pro1+'%';
if(pro>=100){
// document.getElementById("main0".style.color="aliceblue";
main0.style.background="aliceblue";
main1.style.height=0+'px';
clearInterval(sobj);
choose=1;
}
if(choose==1){
xiaozou.style.color="pink";
xiaozou.innerHTML="<h2> 支支灿烂的烛光,岁岁生日的幸福。</h2><h2> 幸运的你,明天会更好!</h2>";
}
},1);
}
</script>
</body>
</html>