-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgsap-img.html
More file actions
125 lines (103 loc) · 3.09 KB
/
gsap-img.html
File metadata and controls
125 lines (103 loc) · 3.09 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*,
*::before,
*::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
height: 100vh;
width: 100%;
}
#page1 {
position: relative;
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: rgba(0, 0, 0, 0.377);
}
.center {
position: relative;
width: 80%;
height: 80%;
}
.img {
overflow: hidden;
position: absolute;
width: 0%;
height: 100%;
}
/* #one {
width: 0;
} */
.text {
z-index: 9;
position: absolute;
overflow: hidden;
bottom: 15%;
left: -10%;
width: 400px;
height: 100px;
/* background-color: red; */
}
.text h1 {
text-transform: uppercase;
top: 100px;
font-size: 6vw;
position: absolute;
}
</style>
</head>
<body>
<div id="page1">
<div class="center">
<div class="text">
<h1>effect.</h1>
<h1>space.</h1>
<h1>design.</h1>
</div>
<div id="one" class="img">
<img src="images/walls.jpg">
</div>
<div id="two" class="img">
<img src="images/space/gallexy1.jpg">
</div>
<div id="three" class="img">
<img src="images/space/effect1.jpg">
</div>
</div>
<!-- <script src="D:\Kalam\Programming Languages\html\gsap\gsap-public\minified\gsap.min.js"></script> -->
<script src="D:\Kalam\Programming Languages\html\gsap-member\gsap-member\minified\gsap.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"
integrity="sha512-7eHRwcbYkK4d9g/6tD/mhkf++eoTHwpNM9woBxtPUBWm67zeAfFC+HrdoE2GanKeocly/VxeLvIqwvCdk7qScg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
<script>
let tl = gsap.timeline({
repeat: -1
});
tl.to(".img", {
ease: Expo.easeInOut,
width: "100%",
stagger: 2
}, 'a').to(".text h1", {
ease: Expo.easeInOut,
top: 0,
stagger: 2
}, 'a').to(".text h1", {
delay: 2,
ease: Expo.easeInOut,
top: "-100%",
stagger: 2
}, 'a')
</script>
</body>
</html>