Custom Scroll with Momentum and Parallax

Developer
Size
8,441 Kb
Views
4,048

How do I make an custom scroll with momentum and parallax?

What is a custom scroll with momentum and parallax? How do you make a custom scroll with momentum and parallax? This script and codes were developed by Aaron Levine on 30 January 2023, Monday.

Custom Scroll with Momentum and Parallax Previews

Custom Scroll with Momentum and Parallax - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Custom Scroll with Momentum and Parallax</title> <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1"/> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="background"> <div class="bg-content"> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> </div>
</div>
<div class="container"> <div class="content"> <h1>Custom</h1> <h1>Momentum / Parallax Scroll</h1> <h2>[ Click and Drag || Touch and Move || Scroll ]</h2> <h2>To Control Velocity</h2><span>Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die. Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die. Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die. Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die. Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water. We swallow it too fast, we choke. We get some in our lungs, we drown. However unreal it may seem, we are connected, you and I. We're on the same curve, just on opposite ends.You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die.</span> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery.transit/0.9.9/jquery.transit.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Custom Scroll with Momentum and Parallax - Script Codes CSS Codes

.background { box-sizing: border-box; position: absolute; left: 0; top: 0; display: inline-block; width: 100%; height: 100%; overflow: hidden; -moz-perspective: 10px; -webkit-perspective: 10px; perspective: 10px; -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.background .bg-content { box-sizing: border-box; position: absolute; left: 0; top: -10000%; display: inline-block; width: 100%; height: 20000%; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjEwMCUiIGN5PSI1MCUiIHI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMjAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjxzdG9wIG9mZnNldD0iMjElIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMSIvPjxzdG9wIG9mZnNldD0iMzQlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMSIvPjxzdG9wIG9mZnNldD0iMzUlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L3JhZGlhbEdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='), url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjAlIiBjeT0iNTAlIiByPSIxMDAlIj48c3RvcCBvZmZzZXQ9IjIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjIxJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjM0JSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjM1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g') 0 -50px; background: -moz-radial-gradient(100% 50%, circle, rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 0.1) 21%, rgba(255, 255, 255, 0.1) 34%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0)), -moz-radial-gradient(0% 50%, circle, rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 0.1) 21%, rgba(255, 255, 255, 0.1) 34%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0)) 0 -50px; background: -webkit-radial-gradient(100% 50%, circle, rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 0.1) 21%, rgba(255, 255, 255, 0.1) 34%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0)), -webkit-radial-gradient(0% 50%, circle, rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 0.1) 21%, rgba(255, 255, 255, 0.1) 34%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0)) 0 -50px; background: radial-gradient(circle at 100% 50%, rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 0.1) 21%, rgba(255, 255, 255, 0.1) 34%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0)), radial-gradient(circle at 0% 50%, rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 0.1) 21%, rgba(255, 255, 255, 0.1) 34%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0)) 0 -50px; background-size: 75px 100px; -moz-perspective: 1px; -webkit-perspective: 1px; perspective: 1px; -moz-perspective-origin: 50% 50%; -webkit-perspective-origin: 50% 50%; perspective-origin: 50% 50%; -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.background .bg-content .dot { box-sizing: border-box; position: absolute; background: #FFF; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%;
}
.background .bg-content .dot:nth-child(1) { left: -416%; top: 76%; width: 400px; height: 400px; background: #c89fdf; box-shadow: 0 0 10px 10px #c89fdf; -moz-transform: perspective(1px) translateZ(-11px); -ms-transform: perspective(1px) translateZ(-11px); -webkit-transform: perspective(1px) translateZ(-11px); transform: perspective(1px) translateZ(-11px);
}
.background .bg-content .dot:nth-child(2) { left: 14%; top: 49%; width: 400px; height: 400px; background: #a09fdf; box-shadow: 0 0 10px 10px #a09fdf; -moz-transform: perspective(1px) translateZ(-3px); -ms-transform: perspective(1px) translateZ(-3px); -webkit-transform: perspective(1px) translateZ(-3px); transform: perspective(1px) translateZ(-3px);
}
.background .bg-content .dot:nth-child(3) { left: -685%; top: 16%; width: 400px; height: 400px; background: #bddf9f; box-shadow: 0 0 10px 10px #bddf9f; -moz-transform: perspective(1px) translateZ(-19px); -ms-transform: perspective(1px) translateZ(-19px); -webkit-transform: perspective(1px) translateZ(-19px); transform: perspective(1px) translateZ(-19px);
}
.background .bg-content .dot:nth-child(4) { left: -113%; top: 98%; width: 400px; height: 400px; background: #df9fa0; box-shadow: 0 0 10px 10px #df9fa0; -moz-transform: perspective(1px) translateZ(-3px); -ms-transform: perspective(1px) translateZ(-3px); -webkit-transform: perspective(1px) translateZ(-3px); transform: perspective(1px) translateZ(-3px);
}
.background .bg-content .dot:nth-child(5) { left: 503%; top: 21%; width: 400px; height: 400px; background: #9fdfc7; box-shadow: 0 0 10px 10px #9fdfc7; -moz-transform: perspective(1px) translateZ(-15px); -ms-transform: perspective(1px) translateZ(-15px); -webkit-transform: perspective(1px) translateZ(-15px); transform: perspective(1px) translateZ(-15px);
}
.background .bg-content .dot:nth-child(6) { left: -102%; top: 63%; width: 400px; height: 400px; background: #d89fdf; box-shadow: 0 0 10px 10px #d89fdf; -moz-transform: perspective(1px) translateZ(-4px); -ms-transform: perspective(1px) translateZ(-4px); -webkit-transform: perspective(1px) translateZ(-4px); transform: perspective(1px) translateZ(-4px);
}
.background .bg-content .dot:nth-child(7) { left: 496%; top: 83%; width: 400px; height: 400px; background: #dbdf9f; box-shadow: 0 0 10px 10px #dbdf9f; -moz-transform: perspective(1px) translateZ(-13px); -ms-transform: perspective(1px) translateZ(-13px); -webkit-transform: perspective(1px) translateZ(-13px); transform: perspective(1px) translateZ(-13px);
}
.background .bg-content .dot:nth-child(8) { left: -104%; top: 82%; width: 400px; height: 400px; background: #b19fdf; box-shadow: 0 0 10px 10px #b19fdf; -moz-transform: perspective(1px) translateZ(-11px); -ms-transform: perspective(1px) translateZ(-11px); -webkit-transform: perspective(1px) translateZ(-11px); transform: perspective(1px) translateZ(-11px);
}
.background .bg-content .dot:nth-child(9) { left: 437%; top: 85%; width: 400px; height: 400px; background: #dfa69f; box-shadow: 0 0 10px 10px #dfa69f; -moz-transform: perspective(1px) translateZ(-18px); -ms-transform: perspective(1px) translateZ(-18px); -webkit-transform: perspective(1px) translateZ(-18px); transform: perspective(1px) translateZ(-18px);
}
.background .bg-content .dot:nth-child(10) { left: 570%; top: 23%; width: 400px; height: 400px; background: #db9fdf; box-shadow: 0 0 10px 10px #db9fdf; -moz-transform: perspective(1px) translateZ(-17px); -ms-transform: perspective(1px) translateZ(-17px); -webkit-transform: perspective(1px) translateZ(-17px); transform: perspective(1px) translateZ(-17px);
}
.background .bg-content .dot:nth-child(11) { left: 139%; top: 70%; width: 400px; height: 400px; background: #9fdfd9; box-shadow: 0 0 10px 10px #9fdfd9; -moz-transform: perspective(1px) translateZ(-3px); -ms-transform: perspective(1px) translateZ(-3px); -webkit-transform: perspective(1px) translateZ(-3px); transform: perspective(1px) translateZ(-3px);
}
.background .bg-content .dot:nth-child(12) { left: -328%; top: 83%; width: 400px; height: 400px; background: #9fdfae; box-shadow: 0 0 10px 10px #9fdfae; -moz-transform: perspective(1px) translateZ(-9px); -ms-transform: perspective(1px) translateZ(-9px); -webkit-transform: perspective(1px) translateZ(-9px); transform: perspective(1px) translateZ(-9px);
}
.background .bg-content .dot:nth-child(13) { left: 391%; top: 94%; width: 400px; height: 400px; background: #9fbbdf; box-shadow: 0 0 10px 10px #9fbbdf; -moz-transform: perspective(1px) translateZ(-21px); -ms-transform: perspective(1px) translateZ(-21px); -webkit-transform: perspective(1px) translateZ(-21px); transform: perspective(1px) translateZ(-21px);
}
.background .bg-content .dot:nth-child(14) { left: -300%; top: 72%; width: 400px; height: 400px; background: #9fdfa7; box-shadow: 0 0 10px 10px #9fdfa7; -moz-transform: perspective(1px) translateZ(-21px); -ms-transform: perspective(1px) translateZ(-21px); -webkit-transform: perspective(1px) translateZ(-21px); transform: perspective(1px) translateZ(-21px);
}
.background .bg-content .dot:nth-child(15) { left: 808%; top: 76%; width: 400px; height: 400px; background: #b99fdf; box-shadow: 0 0 10px 10px #b99fdf; -moz-transform: perspective(1px) translateZ(-22px); -ms-transform: perspective(1px) translateZ(-22px); -webkit-transform: perspective(1px) translateZ(-22px); transform: perspective(1px) translateZ(-22px);
}
.background .bg-content .dot:nth-child(16) { left: 671%; top: 86%; width: 400px; height: 400px; background: #df9fca; box-shadow: 0 0 10px 10px #df9fca; -moz-transform: perspective(1px) translateZ(-15px); -ms-transform: perspective(1px) translateZ(-15px); -webkit-transform: perspective(1px) translateZ(-15px); transform: perspective(1px) translateZ(-15px);
}
.background .bg-content .dot:nth-child(17) { left: -511%; top: 26%; width: 400px; height: 400px; background: #9fc6df; box-shadow: 0 0 10px 10px #9fc6df; -moz-transform: perspective(1px) translateZ(-14px); -ms-transform: perspective(1px) translateZ(-14px); -webkit-transform: perspective(1px) translateZ(-14px); transform: perspective(1px) translateZ(-14px);
}
.background .bg-content .dot:nth-child(18) { left: 1021%; top: 56%; width: 400px; height: 400px; background: #9fbadf; box-shadow: 0 0 10px 10px #9fbadf; -moz-transform: perspective(1px) translateZ(-22px); -ms-transform: perspective(1px) translateZ(-22px); -webkit-transform: perspective(1px) translateZ(-22px); transform: perspective(1px) translateZ(-22px);
}
.background .bg-content .dot:nth-child(19) { left: -69%; top: 1%; width: 400px; height: 400px; background: #dfb09f; box-shadow: 0 0 10px 10px #dfb09f; -moz-transform: perspective(1px) translateZ(-7px); -ms-transform: perspective(1px) translateZ(-7px); -webkit-transform: perspective(1px) translateZ(-7px); transform: perspective(1px) translateZ(-7px);
}
.background .bg-content .dot:nth-child(20) { left: 155%; top: 32%; width: 400px; height: 400px; background: #a5df9f; box-shadow: 0 0 10px 10px #a5df9f; -moz-transform: perspective(1px) translateZ(-5px); -ms-transform: perspective(1px) translateZ(-5px); -webkit-transform: perspective(1px) translateZ(-5px); transform: perspective(1px) translateZ(-5px);
}
.background .bg-content .dot:nth-child(21) { left: -127%; top: 31%; width: 400px; height: 400px; background: #9fdfdd; box-shadow: 0 0 10px 10px #9fdfdd; -moz-transform: perspective(1px) translateZ(-3px); -ms-transform: perspective(1px) translateZ(-3px); -webkit-transform: perspective(1px) translateZ(-3px); transform: perspective(1px) translateZ(-3px);
}
.background .bg-content .dot:nth-child(22) { left: 55%; top: 77%; width: 400px; height: 400px; background: #df9fb1; box-shadow: 0 0 10px 10px #df9fb1; -moz-transform: perspective(1px) translateZ(-4px); -ms-transform: perspective(1px) translateZ(-4px); -webkit-transform: perspective(1px) translateZ(-4px); transform: perspective(1px) translateZ(-4px);
}
.background .bg-content .dot:nth-child(23) { left: 129%; top: 78%; width: 400px; height: 400px; background: #df9fdf; box-shadow: 0 0 10px 10px #df9fdf; -moz-transform: perspective(1px) translateZ(-7px); -ms-transform: perspective(1px) translateZ(-7px); -webkit-transform: perspective(1px) translateZ(-7px); transform: perspective(1px) translateZ(-7px);
}
.background .bg-content .dot:nth-child(24) { left: 30%; top: 10%; width: 400px; height: 400px; background: #cd9fdf; box-shadow: 0 0 10px 10px #cd9fdf; -moz-transform: perspective(1px) translateZ(-3px); -ms-transform: perspective(1px) translateZ(-3px); -webkit-transform: perspective(1px) translateZ(-3px); transform: perspective(1px) translateZ(-3px);
}
.background .bg-content .dot:nth-child(25) { left: 599%; top: 15%; width: 400px; height: 400px; background: #dfac9f; box-shadow: 0 0 10px 10px #dfac9f; -moz-transform: perspective(1px) translateZ(-19px); -ms-transform: perspective(1px) translateZ(-19px); -webkit-transform: perspective(1px) translateZ(-19px); transform: perspective(1px) translateZ(-19px);
}
.background .bg-content .dot:nth-child(26) { left: -54%; top: 77%; width: 400px; height: 400px; background: #dfdb9f; box-shadow: 0 0 10px 10px #dfdb9f; -moz-transform: perspective(1px) translateZ(-21px); -ms-transform: perspective(1px) translateZ(-21px); -webkit-transform: perspective(1px) translateZ(-21px); transform: perspective(1px) translateZ(-21px);
}
.background .bg-content .dot:nth-child(27) { left: -176%; top: 39%; width: 400px; height: 400px; background: #c4df9f; box-shadow: 0 0 10px 10px #c4df9f; -moz-transform: perspective(1px) translateZ(-12px); -ms-transform: perspective(1px) translateZ(-12px); -webkit-transform: perspective(1px) translateZ(-12px); transform: perspective(1px) translateZ(-12px);
}
.background .bg-content .dot:nth-child(28) { left: 153%; top: 32%; width: 400px; height: 400px; background: #9fc0df; box-shadow: 0 0 10px 10px #9fc0df; -moz-transform: perspective(1px) translateZ(-9px); -ms-transform: perspective(1px) translateZ(-9px); -webkit-transform: perspective(1px) translateZ(-9px); transform: perspective(1px) translateZ(-9px);
}
.background .bg-content .dot:nth-child(29) { left: -120%; top: 31%; width: 400px; height: 400px; background: #9fdfb1; box-shadow: 0 0 10px 10px #9fdfb1; -moz-transform: perspective(1px) translateZ(-3px); -ms-transform: perspective(1px) translateZ(-3px); -webkit-transform: perspective(1px) translateZ(-3px); transform: perspective(1px) translateZ(-3px);
}
.background .bg-content .dot:nth-child(30) { left: -237%; top: 72%; width: 400px; height: 400px; background: #df9fbc; box-shadow: 0 0 10px 10px #df9fbc; -moz-transform: perspective(1px) translateZ(-5px); -ms-transform: perspective(1px) translateZ(-5px); -webkit-transform: perspective(1px) translateZ(-5px); transform: perspective(1px) translateZ(-5px);
}
.background .bg-content .dot:nth-child(31) { left: -203%; top: 46%; width: 400px; height: 400px; background: #dfc09f; box-shadow: 0 0 10px 10px #dfc09f; -moz-transform: perspective(1px) translateZ(-6px); -ms-transform: perspective(1px) translateZ(-6px); -webkit-transform: perspective(1px) translateZ(-6px); transform: perspective(1px) translateZ(-6px);
}
.background .bg-content .dot:nth-child(32) { left: 259%; top: 49%; width: 400px; height: 400px; background: #9fbcdf; box-shadow: 0 0 10px 10px #9fbcdf; -moz-transform: perspective(1px) translateZ(-19px); -ms-transform: perspective(1px) translateZ(-19px); -webkit-transform: perspective(1px) translateZ(-19px); transform: perspective(1px) translateZ(-19px);
}
.background .bg-content .dot:nth-child(33) { left: -18%; top: 93%; width: 400px; height: 400px; background: #dfda9f; box-shadow: 0 0 10px 10px #dfda9f; -moz-transform: perspective(1px) translateZ(-3px); -ms-transform: perspective(1px) translateZ(-3px); -webkit-transform: perspective(1px) translateZ(-3px); transform: perspective(1px) translateZ(-3px);
}
.background .bg-content .dot:nth-child(34) { left: 496%; top: 25%; width: 400px; height: 400px; background: #dfbf9f; box-shadow: 0 0 10px 10px #dfbf9f; -moz-transform: perspective(1px) translateZ(-15px); -ms-transform: perspective(1px) translateZ(-15px); -webkit-transform: perspective(1px) translateZ(-15px); transform: perspective(1px) translateZ(-15px);
}
.background .bg-content .dot:nth-child(35) { left: -284%; top: 48%; width: 400px; height: 400px; background: #df9fac; box-shadow: 0 0 10px 10px #df9fac; -moz-transform: perspective(1px) translateZ(-14px); -ms-transform: perspective(1px) translateZ(-14px); -webkit-transform: perspective(1px) translateZ(-14px); transform: perspective(1px) translateZ(-14px);
}
.background .bg-content .dot:nth-child(36) { left: 182%; top: 69%; width: 400px; height: 400px; background: #b09fdf; box-shadow: 0 0 10px 10px #b09fdf; -moz-transform: perspective(1px) translateZ(-13px); -ms-transform: perspective(1px) translateZ(-13px); -webkit-transform: perspective(1px) translateZ(-13px); transform: perspective(1px) translateZ(-13px);
}
.background .bg-content .dot:nth-child(37) { left: 249%; top: 32%; width: 400px; height: 400px; background: #dfd99f; box-shadow: 0 0 10px 10px #dfd99f; -moz-transform: perspective(1px) translateZ(-13px); -ms-transform: perspective(1px) translateZ(-13px); -webkit-transform: perspective(1px) translateZ(-13px); transform: perspective(1px) translateZ(-13px);
}
.background .bg-content .dot:nth-child(38) { left: 142%; top: 93%; width: 400px; height: 400px; background: #c5df9f; box-shadow: 0 0 10px 10px #c5df9f; -moz-transform: perspective(1px) translateZ(-4px); -ms-transform: perspective(1px) translateZ(-4px); -webkit-transform: perspective(1px) translateZ(-4px); transform: perspective(1px) translateZ(-4px);
}
.background .bg-content .dot:nth-child(39) { left: 313%; top: 43%; width: 400px; height: 400px; background: #9fdfcf; box-shadow: 0 0 10px 10px #9fdfcf; -moz-transform: perspective(1px) translateZ(-10px); -ms-transform: perspective(1px) translateZ(-10px); -webkit-transform: perspective(1px) translateZ(-10px); transform: perspective(1px) translateZ(-10px);
}
.background .bg-content .dot:nth-child(40) { left: 298%; top: 28%; width: 400px; height: 400px; background: #9fdfae; box-shadow: 0 0 10px 10px #9fdfae; -moz-transform: perspective(1px) translateZ(-19px); -ms-transform: perspective(1px) translateZ(-19px); -webkit-transform: perspective(1px) translateZ(-19px); transform: perspective(1px) translateZ(-19px);
}
.background .bg-content .dot:nth-child(41) { left: 245%; top: 98%; width: 400px; height: 400px; background: #df9fc5; box-shadow: 0 0 10px 10px #df9fc5; -moz-transform: perspective(1px) translateZ(-18px); -ms-transform: perspective(1px) translateZ(-18px); -webkit-transform: perspective(1px) translateZ(-18px); transform: perspective(1px) translateZ(-18px);
}
.background .bg-content .dot:nth-child(42) { left: 99%; top: 85%; width: 400px; height: 400px; background: #9fd2df; box-shadow: 0 0 10px 10px #9fd2df; -moz-transform: perspective(1px) translateZ(-4px); -ms-transform: perspective(1px) translateZ(-4px); -webkit-transform: perspective(1px) translateZ(-4px); transform: perspective(1px) translateZ(-4px);
}
.background .bg-content .dot:nth-child(43) { left: -326%; top: 57%; width: 400px; height: 400px; background: #9fa7df; box-shadow: 0 0 10px 10px #9fa7df; -moz-transform: perspective(1px) translateZ(-17px); -ms-transform: perspective(1px) translateZ(-17px); -webkit-transform: perspective(1px) translateZ(-17px); transform: perspective(1px) translateZ(-17px);
}
.background .bg-content .dot:nth-child(44) { left: -976%; top: 35%; width: 400px; height: 400px; background: #dfb89f; box-shadow: 0 0 10px 10px #dfb89f; -moz-transform: perspective(1px) translateZ(-22px); -ms-transform: perspective(1px) translateZ(-22px); -webkit-transform: perspective(1px) translateZ(-22px); transform: perspective(1px) translateZ(-22px);
}
.background .bg-content .dot:nth-child(45) { left: -100%; top: 56%; width: 400px; height: 400px; background: #da9fdf; box-shadow: 0 0 10px 10px #da9fdf; -moz-transform: perspective(1px) translateZ(-9px); -ms-transform: perspective(1px) translateZ(-9px); -webkit-transform: perspective(1px) translateZ(-9px); transform: perspective(1px) translateZ(-9px);
}
.background .bg-content .dot:nth-child(46) { left: 791%; top: 90%; width: 400px; height: 400px; background: #9fa9df; box-shadow: 0 0 10px 10px #9fa9df; -moz-transform: perspective(1px) translateZ(-17px); -ms-transform: perspective(1px) translateZ(-17px); -webkit-transform: perspective(1px) translateZ(-17px); transform: perspective(1px) translateZ(-17px);
}
.background .bg-content .dot:nth-child(47) { left: -231%; top: 6%; width: 400px; height: 400px; background: #9fdbdf; box-shadow: 0 0 10px 10px #9fdbdf; -moz-transform: perspective(1px) translateZ(-8px); -ms-transform: perspective(1px) translateZ(-8px); -webkit-transform: perspective(1px) translateZ(-8px); transform: perspective(1px) translateZ(-8px);
}
.background .bg-content .dot:nth-child(48) { left: 395%; top: 41%; width: 400px; height: 400px; background: #c29fdf; box-shadow: 0 0 10px 10px #c29fdf; -moz-transform: perspective(1px) translateZ(-18px); -ms-transform: perspective(1px) translateZ(-18px); -webkit-transform: perspective(1px) translateZ(-18px); transform: perspective(1px) translateZ(-18px);
}
.background .bg-content .dot:nth-child(49) { left: 656%; top: 1%; width: 400px; height: 400px; background: #9fdfaa; box-shadow: 0 0 10px 10px #9fdfaa; -moz-transform: perspective(1px) translateZ(-18px); -ms-transform: perspective(1px) translateZ(-18px); -webkit-transform: perspective(1px) translateZ(-18px); transform: perspective(1px) translateZ(-18px);
}
.background .bg-content .dot:nth-child(50) { left: 604%; top: 46%; width: 400px; height: 400px; background: #9fdfdd; box-shadow: 0 0 10px 10px #9fdfdd; -moz-transform: perspective(1px) translateZ(-15px); -ms-transform: perspective(1px) translateZ(-15px); -webkit-transform: perspective(1px) translateZ(-15px); transform: perspective(1px) translateZ(-15px);
}
.container { box-sizing: border-box; position: absolute; left: 0; top: 0; display: inline-block; width: 100%; height: 100%; overflow: hidden;
}
.container .content { box-sizing: border-box; position: absolute; left: 0; top: 0; display: inline-block; width: 100%; height: 100%; padding: 4rem; line-height: 2.75rem; text-align: justify; color: #FFF;
}
.container .content > span { margin-top: 4rem;
}
h1 { text-align: center;
}
h2 { text-align: center; margin: 0; padding: 0;
}
html, body { width: 100%; height: 100%; padding: 0; margin: 0; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; background: #1c1c1c;
}

Custom Scroll with Momentum and Parallax - Script Codes JS Codes

(function(){ var startY, // px curTop = 0, // px vel = 0.00000001, // px/ms mousewheel jumps if vel=0 for some reason... lastTop, // deg lastTime, // ms lastY, // px mass = 1000, // virtual u = 4, // virtual friction coeffecient wheel_ratio = 1000, iStartTime = Date.now(); $('.container').on('mousedown touchstart', function(e){ vel = 0; e.preventDefault(); startY = e.pageY || e.originalEvent.touches[0].pageY; $('body').on('mousemove touchmove', function(e){ e.preventDefault(); var newY = e.pageY || e.originalEvent.touches[0].pageY, difTop = (newY - startY); // deg curTop += difTop; lastY = startY; startY = newY; lastTop = difTop; lastTime = Date.now(); $('.bg-content').css('transform', 'perspective(10px) translate3d(0,'+(curTop/2)+'px, 0)'); $('.content').css('transform', 'perspective(10px) translate3d(0,'+(curTop)+'px, 0)'); }); $('body').on('mouseup touchend', function(){ var newTime = Date.now(), difTime = newTime - lastTime; vel -= (lastTop / difTime)/(e.pageY ? 6 : 1); vel = !isNaN(vel) ? vel : 0; iStartTime = null; $('body').off('mousemove touchmove mouseup touchend'); }); }); $('.container').on('mousewheel', function(e){ var difY = e.originalEvent.deltaY || 0; //curTop += difY; vel += difY/wheel_ratio; /*$('.bg-content').transition({'transform': 'perspective(1px) translate3d(0,'+(curTop/2)+'px, 0)'},50,'linear'); $('.content').transition({'transform': 'perspective(1px) translate3d(0,'+(curTop)+'px, 0)'},50,'linear');*/ }); (function inertia(){ vel = !isNaN(vel) ? vel : 0; if(iStartTime == null){ //Prevents it from doing a double step in a given frame iStartTime = Date.now(); } else if(vel != 0){ var force = vel * u, acc = force/mass, newTime = Date.now(), time = newTime - iStartTime; iStartTime = newTime; vel -= acc * time; vel = !isNaN(vel) ? vel : 0; var difTop = (vel * time); curTop -= difTop; $('.bg-content').css('transform', 'perspective(10px) translate3d(0,'+(curTop/2)+'px, 0)'); $('.content').css('transform', 'perspective(10px) translate3d(0,'+(curTop)+'px, 0)'); } requestAnimationFrame(inertia); })(); $(document).on('touchmove', function(e){ e.preventDefault(); });
})();
Custom Scroll with Momentum and Parallax - Script Codes
Custom Scroll with Momentum and Parallax - Script Codes
Home Page Home
Developer Aaron Levine
Username Aldlevine
Uploaded January 30, 2023
Rating 4.5
Size 8,441 Kb
Views 4,048
Do you need developer help for Custom Scroll with Momentum and Parallax?

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!

Aaron Levine (Aldlevine) Script Codes
Create amazing marketing copy 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!