Scroll animate
How do I make an scroll animate?
What is a scroll animate? How do you make a scroll animate? This script and codes were developed by Revolution Graphics on 01 October 2022, Saturday.
Scroll animate - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Scroll animate</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Scroll animate - Script Codes CSS Codes
/*********************
Box Sizing
*********************/
*, *:before, *:after { box-sizing: inherit;
}
/*********************
General
*********************/
html { box-sizing: border-box; background: #1d1f20; height: 2000px;
}
body { position: relative;
}
div { position: fixed; display: inline-block; top: 0; width: 50px; height: 50px; background: green;
}
Scroll animate - Script Codes JS Codes
TweenLite.defaultEase = Back.easeOut; TweenMax.set("div", {transformOrigin:"100% 0%", xPercent:-100, left:"100%", top:0});
var headerAnim = new TimelineLite({paused:true});
headerAnim.to("div", 1, {left:"50%"});
var scrollTimeout, scrollactive = false;
$(window).on('scroll', onscroll);
function onscroll(e) { console.log("onscroll"); if (!scrollactive) { scrollupdate(); // throttle the next scrollupdate scrollactive = true; clearTimeout(scrollTimeout); scrollTimeout = setTimeout(function() { scrollactive = false; }, 200); }
}
function scrollupdate() { console.log("scrollupdate"); $(window).scroll(function() { console.log("onscroll"); var scroll = $(window).scrollTop(); if (scroll >= 50) { headerAnim.play() } else { headerAnim.reverse() } });
}
Developer | Revolution Graphics |
Username | rgfx |
Uploaded | October 01, 2022 |
Rating | 3 |
Size | 2,428 Kb |
Views | 34,408 |
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!
Name | Size |
Check Mark troggle | 3,750 Kb |
Toggle css on scroll position | 1,718 Kb |
Call to action button | 3,077 Kb |
Simple Horizontal Stacked Bar | 2,000 Kb |
Simple Responsive Popup | 2,906 Kb |
SVG Background Repeat - Works IN IE | 2,957 Kb |
Animating TImescale Gsap tweenmax | 2,149 Kb |
Custom Checkbox and radio inputs SCSS | 3,367 Kb |
Position Fixed center right | 1,881 Kb |
Keep Image in Center of Div. | 2,005 Kb |
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!
Name | Username | Size |
Sign Up Form | Sicontis | 5,272 Kb |
Sticky Navbar | Phantomesse | 5,106 Kb |
Filtre ile Arama Kutusu - Search Box with Filter | AyhanALTINOK | 3,448 Kb |
Cars going | Netoguimaraes | 1,699 Kb |
Multiple jCarousel | Pafnuty | 2,461 Kb |
CSS Google Now | Jackmoran | 3,196 Kb |
SCSS Unit Conversion | Jakob-e | 8,210 Kb |
A Pen by Kenny Mark | Kennymark | 5,574 Kb |
A Pen by Mohomed Anees | Mohomedanees | 12,597 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!