Skip to content

Instantly share code, notes, and snippets.

@fzn0x
Created July 21, 2023 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fzn0x/c166eff294a6a8280b84aff4dd80dce2 to your computer and use it in GitHub Desktop.
Save fzn0x/c166eff294a6a8280b84aff4dd80dce2 to your computer and use it in GitHub Desktop.
yyy
<!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>
@fzn0x
Copy link
Author

fzn0x commented Jul 21, 2023

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,
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment