This repository was archived by the owner on Mar 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (79 loc) · 1.83 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
color: #fffce1;
}
body {
background-color: #0e100f;
}
h1, h2, h3, h4, h5, h6 {
color: #21e851;
}
.circle {
width: 100px;
height: 100px;
border-radius: 50%;
background-color: #21e851;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>
<script rel="preload" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="container" >
<div class="circle" />
</div>
<script>
// Solution 1:
gsap.to(".circle", {
duration: 2,
y: 200,
scale: 2,
ease: "sine.inOut",
});
gsap.to(".circle", {
duration: 2,
y: 0,
scale: 1,
ease: "sine.inOut",
delay: 2
});
gsap.to(".circle", {
duration: 1,
x: 100,
ease: "sine.out",
});
gsap.to(".circle", {
duration: 1,
x: 0,
ease: "sine.in",
delay: 1
});
gsap.to(".circle", {
duration: 1,
x: -100,
ease: "sine.out",
delay: 2
});
gsap.to(".circle", {
duration: 1,
x: 0,
ease: "sine.in",
delay: 3
});
</script>
</body>
</html>