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 |
CSS Background | 2,293 Kb |
Keep Image in Center of Div. | 2,005 Kb |
A Pen by Revolution Graphics | 2,991 Kb |
SVG Background Repeat - Works IN IE | 2,957 Kb |
Video-js scss | 13,211 Kb |
Flexbox Center Right justify | 2,403 Kb |
Position Fixed center right | 1,881 Kb |
Custom Checkbox and radio inputs SCSS | 3,367 Kb |
Scroll animate | 2,428 Kb |
Simple Responsive Popup | 2,906 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 |
Automatic scroll | Skeurentjes | 4,042 Kb |
Break Out | AzazelN28 | 12,431 Kb |
Wave Lines | Mikehobizal | 4,023 Kb |
Pruebas de d3.js | Juanmanuelcarnerero | 2,485 Kb |
Canvas snow | Win7killer | 2,572 Kb |
Mandelbrot Fractal | _Billy_Brown | 2,706 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
Test | Dviate | 2,668 Kb |
Lecture 1 | Law | 0 Kb |
SVG Basics | HipsterBrown | 1,852 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!