-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwatergen.html
145 lines (124 loc) · 4.08 KB
/
watergen.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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
.btn{
height:50px;
width:400px;
margin-left:200px;
border: 1px solid black;
border-radius: 40px;
background-color: rgb(67, 203, 67);
}
.btn1{
height:50px;
width:400px;
margin-left:300px;
border: 1px solid black;
border-radius: 40px;
background-color: red;
}
.h1{
display: flex;
margin: auto;
justify-content: center;
align-items: center;
font-size: 40px;
padding: 0px;
margin: 0px;
background-color: aquamarine;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
.btn,.btn1{
margin-top: 40px;
font-size: 20px;
}
.btn1:hover{
background-color: aliceblue;
color:red;
font-style: italic;
}
.btn:hover{
background-color: aliceblue;
color:green;
font-style: italic;
}
.demo{
display: flex;
justify-content: center;
margin-top: 150px;
font-size: 50px;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
.fill{
border:2px solid green;
height:50px;
width:900px;
/* display: flex; */
/* float: right; */
margin-left: 250px;
animation-name: anime;
animation-duration: 9s;
animation-iteration-count: 1;
}
body{
background:linear-gradient(#e66465,#9198e5);
background-repeat: no-repeat;
background-size: cover;
height: 800px;
}
@keyframes anime{
0%{background-color: rgb(135, 210, 224);width: 0%;}
25%{background-color: rgb(62, 180, 220);width:25%}
50%{background-color: rgb(36, 118, 204);width:50%}
75%{background-color: rgba(0, 102, 255, 0.849);width:65%}
100%{background-color: blue;width:75%}
}
.image{
height: 200px;
width:200px;
}
</style>
<body>
<div class="h1">
<h1>WATER GENERATOR</h1></div>
<button class="btn" onclick=onn()>Start The Generator</button>
<button class="btn1" onclick=stop()>Stop The Generator</button>
<p class="demo" id="demo"></p>
<audio src="./mixkit-bike-magical-bell-591.wav" id="trem" ></audio>
<audio src="./mixkit-bell-gentle-alarm-notification-940.wav" id="gen"></audio>
<audio src="./mixkit-alert-bells-echo-765.wav" id="step"></audio>
<div class="fill" id="fill"></div>
<script>
let fill=document.getElementById('fill');
fill.style.display="none";
function onn(){
let fill=document.getElementById('fill');
fill.style.display="flex";
let demo= document.getElementById('demo');
demo.innerHTML="water is filling pliss wait";
globalThis.never= setTimeout(() =>{
let demo= document.getElementById('demo');
demo.innerHTML="water is filled pliss stop the generator";
let gen=document.getElementById('gen')
gen.play();
},9000);
let trem= document.getElementById('trem');
trem.play();
}
function stop(){
clearTimeout(never)
let demo= document.getElementById('demo');
demo.innerHTML="GENERATOR STOPPED SUCCESSFULLY";
fill.style.display="none"
let step=document.getElementById('step');
step.play()
gen.pause()
};
</script>
</body>
</html>