-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
26 lines (24 loc) · 948 Bytes
/
script.js
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
const ufoLight = document.querySelector('#ufoLight');
const airBubbles = document.querySelector('#airBubbles');
const ghostIn = document.getElementById('ghostIn');
const ghostOut = document.getElementById('ghostOut');
const mouth = document.getElementById('mouth');
const eyes = document.getElementById('g-eyes');
const ufo = document.getElementById('wholeUfo')
function lightOn() {
setTimeout(() => {
ghostIn.style.display = 'block';
eyes.style.animation = 'eyes-top 0.5s linear forwards .5s';
ufo.style.animation = 'eyes-top 1s linear alternate infinite ';
ghostOut.style.animation = 'ghost-top 1s ease-in-out alternate infinite 1s';
airBubbles.style.animation = 'ghost-top 1s ease-in-out alternate infinite 1s';
setTimeout(() => {
ufoLight.style.display = 'block';
}, 500);
setTimeout(() => {
mouth.style.opacity = '1';
airBubbles.style.opacity = '1';
}, 1000);
}, 3510);
}
lightOn();