-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
43 lines (41 loc) · 906 Bytes
/
app.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
const hero = document.querySelector(".hero");
const slider = document.querySelector(".slider");
const logo = document.querySelector("#logo");
const hamburger = document.querySelector(".hamburger");
const headline = document.querySelector(".headline");
const tl = new TimelineMax();
tl.fromTo(hero, 1, { height: "0%" }, { height: "80%", ease: Power2.easeInOut })
.fromTo(
hero,
1.2,
{ width: "100%" },
{ width: "80%", ease: Power2.easeInOut }
)
.fromTo(
slider,
1.2,
{ x: "-100%" },
{ x: "0%", ease: Power2.easeInOut },
"-=1.2"
)
.fromTo(
logo,
0.5,
{ opacity: "0", x: "30" },
{ opacity: "1", x: "0" },
"-=0.5"
)
.fromTo(
hamburger,
0.5,
{ opacity: "0", x: "30" },
{ opacity: "1", x: "0" },
"-=0.5"
)
.fromTo(
headline,
0.5,
{ opacity: "0", x: "30" },
{ opacity: "1", x: "0" },
"-=0.5"
);