-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
68 lines (52 loc) · 1.05 KB
/
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
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
function cursorEffect() {
var cursor = document.querySelector(".cursor");
window.addEventListener("mousemove", function (e) {
gsap.to(cursor, {
x: e.x,
y: e.y
})
})
}
cursorEffect();
function animation(){
gsap.from('nav ul li', {
opacity: 0,
y: 20,
duration: 1,
stagger: 0.3,
})
gsap.from('#banner h1', {
y: 20,
opacity: 0,
scale: 0.2,
opacity: 0,
duration: 1,
})
gsap.to('#banner .last img', {
y: 100,
duration: 2,
repeat: -1,
yoyo: true
})
gsap.to('#sec-four .one-img', {
y: 80,
duration: 2,
repeat: -1,
yoyo: true
})
gsap.to('#sec-four .two-img', {
y: 80,
duration: 2,
repeat: -1,
delay: 1,
yoyo: true
})
gsap.to('#sec-four .three-img', {
y: 80,
duration: 2,
repeat: -1,
delay: 2,
yoyo: true
})
}
animation()