Skrollr basic implementation
How do I make an skrollr basic implementation?
Full explanation at http://www.bram.us/2014/01/01/skrollr-css-animations-linked-to-scroll-position/. What is a skrollr basic implementation? How do you make a skrollr basic implementation? This script and codes were developed by Bramus on 23 July 2022, Saturday.
Skrollr basic implementation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Skrollr basic implementation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!-- For a full explanation of this code, please refer to the blogpost at http://www.bram.us/2014/01/01/skrollr-css-animations-linked-to-scroll-position/ -->
<div id="box1">box1</div>
<div id="box2">box2</div>
<script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="https://prinzhorn.github.io/skrollr/dist/skrollr.min.js"></script> <script src="js/index.js"></script>
</body>
</html>
Skrollr basic implementation - Script Codes CSS Codes
/* For a full explanation of this code, please refer to the blogpost at http://www.bram.us/2014/01/01/skrollr-css-animations-linked-to-scroll-position/ */
body { margin: 0; padding: 0; background: #fff fixed url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX4+Pj09PQf/c7fAAAAGklEQVR4Xq3MIQEAAADDIPqX/kvMIMEWEm8O7b0/wewc/NcAAAAASUVORK5CYII=) repeat;
}
div { overflow: hidden; text-align: center;
}
#box1 { position: fixed; background: blue; margin: auto; top: 0; left: 0; right: 0; bottom: 0;
}
#box2 { position: fixed; background: red; height: 100px; width: 100%; margin-top: 50px;
}
Skrollr basic implementation - Script Codes JS Codes
// For a full explanation of this code, please refer to the blogpost at http://www.bram.us/2014/01/01/skrollr-css-animations-linked-to-scroll-position/
// setSkrollr function extracted from https://www.pingdom.com/2013/
var setSkrollr = function($el, data) { for (var i = 0, l = data.length; i < l; i++) { var d = data[i], px = d[0]; css = d[1]; $el.attr('data-' + px, css); }
}
jQuery(function($) { setSkrollr($('#box1'), [[0, 'width:100%'], [1500, 'width:0%']]); setSkrollr($('#box2'), [[0, 'transform:translateX(-100%)'], [750, 'transform:translateX(100%)'], [1500, 'transform:translateX(-100%)']]); skrollr.init({ smoothScrolling: false });
});
Developer | Bramus |
Username | bramus |
Uploaded | July 23, 2022 |
Rating | 3.5 |
Size | 2,467 Kb |
Views | 42,504 |
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 |
Simple Flexbox Grid System | 7,705 Kb |
Simplest CSS Slideshow | 1,994 Kb |
Bouncing Ball Animation | 5,013 Kb |
Scroll Animations | 3,466 Kb |
CSS Revolving Door | 2,312 Kb |
Scrolling Horizontal Isotope | 2,017 Kb |
Pythagoras | 3,197 Kb |
Canvas multiline fillText | 1,875 Kb |
SVG SMIL Logo Animation | 3,788 Kb |
Skrollr basic implementation, alternative | 2,611 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 |
Mondrian | Chrisarmstrong | 2,787 Kb |
Toggle menu | Seyedi | 2,279 Kb |
Gradients | Karpovsystems | 2,394 Kb |
Prism | Pyrografix | 2,843 Kb |
Weather App | OmranAbazid | 2,596 Kb |
Learning FlexBox | Alex_rodrigues | 2,821 Kb |
Twinkling Stars | Ripley6811 | 2,750 Kb |
Slide like Mailbox | Hmps | 3,758 Kb |
Contact | GanNichiHa | 2,514 Kb |
A Pen by James Podles | Jpod | 2,656 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!