GSAP rising block

Developer
Size
2,417 Kb
Views
12,144

How do I make an gsap rising block?

Https://twitter.com/anatudor/status/696067669313921025. What is a gsap rising block? How do you make a gsap rising block? This script and codes were developed by Amanda Cheung on 15 November 2022, Tuesday.

GSAP rising block Previews

GSAP rising block - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>GSAP rising block</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input type="button" id="button" value="Restart!">
<div id="box"> <div class="side side--left"></div> <div class="side side--right"></div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.2/TweenMax.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

GSAP rising block - Script Codes CSS Codes

#box { position: relative; left: 50%;
}
#box:before { content: '';	position: absolute; height: 0;	width: 0;	border: 30px solid transparent;	border-left: 70px solid rgb(255,20,147);
}
#box:after { content: '';	position: absolute; top: 0;	left: -100px; height: 0;	width: 0;	border: 30px solid transparent;	border-right: 70px solid rgb(255,20,147);
}
.side--left { position: absolute; top: 45px; left: -70px; width: 70px;	height: 200px;	background-color: rgb(204,16,118); transform: skewY(23deg);
}
.side--right { position: absolute; top: 45px; width: 70px;	height: 200px;	background: rgb(230,18,133); transform: skewY(-23deg);
}

GSAP rising block - Script Codes JS Codes

var button = $("#button"), box = $("#box"), sides = $(".side"), tl = new TimelineLite(); tl.to(box, 1, {top: "200px", repeat: -1, yoyo: true}) .to(sides, 1, {height: "0px", repeat: -1, yoyo: true}, 0);
button.click(function() { tl.restart();
});
GSAP rising block - Script Codes
GSAP rising block - Script Codes
Home Page Home
Developer Amanda Cheung
Username acacheung
Uploaded November 15, 2022
Rating 3
Size 2,417 Kb
Views 12,144
Do you need developer help for GSAP rising block?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Amanda Cheung (acacheung) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!