Created
July 21, 2023 12:45
-
-
Save fzn0x/c166eff294a6a8280b84aff4dd80dce2 to your computer and use it in GitHub Desktop.
yyy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
.container { | |
visibility: hidden; | |
} | |
.quote { | |
font-size: 40px; | |
position: absolute; | |
left: 0; | |
right: 0; | |
margin: 20% auto 0; | |
text-align: center; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="one quote">Jangan lupa makan</div> | |
<div class="two quote">Karena bentar lagi imsak</div> | |
<div class="three quote">Selamat menutup puasa</div> | |
</div> | |
</body> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script> | |
<script type="text/babel" src="main.js"></script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
const timeline1 = new TimelineMax();
timeline1
.to(".container", 0.1, {
visibility: "visible"
})
.from(".one", 1, {
opacity: 0,
y: 10,
})
.to(".one", 1, {
opacity: 0,
y: 10,
}, "+=0.5")
.from(".two", 1, {
opacity: 0,
scale: 0.2,
})
.to(".two", 1, {
opacity: 0,
scale: 0.2,
}, "+=1")
.from(".three", 1, {
opacity: 0,
y: 10,
})
.to(".three", 1, {
opacity: 0,
y: 10,
})