-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
29 lines (27 loc) · 787 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
const hero = document.querySelector('.hero');
const slider = document.querySelector('.slider');
const logo = document.querySelector('#logo');
const stripes = document.querySelector('.stripes');
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(stripes, 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");