Parallax Scroll Prototype

Size
5,836 Kb
Views
40,480

How do I make an parallax scroll prototype?

Experimenting with a new landing page technique for a website.It's not quite rocksteady enough to use (yet):. What is a parallax scroll prototype? How do you make a parallax scroll prototype? This script and codes were developed by Woodrow Barlow on 31 July 2022, Sunday.

Parallax Scroll Prototype Previews

Parallax Scroll Prototype - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Parallax Scroll Prototype</title> <link rel='stylesheet prefetch' href='http://fonts.googleapis.com/css?family=Roboto:400,300,700|Raleway:400,100,700'>
<link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="parallax"> <header> <h1>Page Title</h1> <a href="#content" id="scroll" title="Scroll down...">Scroll down...</a> </header> <main id="content"> <h3>What is Lorem Ipsum?</h3> <p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p> <h3>Where does it come from?</h3> <p> Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. </p> <p> The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. </p> <h3>Why do we use it?</h3> <p> It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). </p> <h3>Where can I get some?</h3> <p> There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc. </p> <footer> <a href="#" class="email">[email protected]</a> <p>&copy; 2015 Woodrow Barlow. MIT License.</p> </footer> </main>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Parallax Scroll Prototype - Script Codes CSS Codes

@-webkit-keyframes bobbing { 0% { padding-bottom: 10px; } 100% { padding-bottom: 20px; }
}
@keyframes bobbing { 0% { padding-bottom: 10px; } 100% { padding-bottom: 20px; }
}
* { margin: 0; padding: 0; font-family: 'Roboto', sans-serif;
}
h1, h2, h3 { font-family: 'Raleway', sans-serif; font-weight: 400; margin: 30px auto 10px auto; max-width: 800px;
}
p { margin: 10px auto; text-align: justify; max-width: 800px; line-height: 125%; letter-spacing: 0.05em;
}
#parallax { height: 100vh; overflow-x: hidden; overflow-y: auto; -webkit-perspective: 300px; perspective: 300px; -webkit-perspective-origin-x: 100%; perspective-origin-x: 100%;
}
header, main { position: absolute; top: 0; left: 0; right: 0; bottom: 0; -webkit-transform-origin-x: 100%; transform-origin-x: 100%;
}
header { -webkit-transform: translateZ(-300px) scale(2); transform: translateZ(-300px) scale(2);
}
header::before { content: ''; display: block; position: absolute; width: 100%; height: 100%; background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)), url("https://placekitten.com/g/700/700") center/cover; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)), url("https://placekitten.com/g/700/700") center/cover; -webkit-transform: scale(1.1); transform: scale(1.1); pointer-events: none; -webkit-transition: all 2s ease; transition: all 2s ease;
}
header h1 { position: absolute; text-align: center; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); color: #fff;
}
header #scroll { position: absolute; bottom: 15px; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); font-size: 0; color: #fff; text-decoration: none; border-bottom: 4pt solid #fff; -webkit-animation: bobbing 1s ease; animation: bobbing 1s ease; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-direction: alternate; animation-direction: alternate;
}
header #scroll::before { font-family: 'FontAwesome'; font-size: 42pt; content: '\f0a7'; -webkit-animation: bobbing 1s ease; animation: bobbing 1s ease; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-direction: alternate; animation-direction: alternate;
}
header.scrolled::before { -webkit-filter: blur(5px); filter: blur(5px);
}
main { position: relative; margin-top: 100vh; min-height: 100vh; background: #fff; padding: 15px; padding-bottom: 140px;
}
footer { position: absolute; bottom: 0; height: 100px; width: 100%; background: #000; color: #fff; text-align: center; padding-top: 25px;
}
footer .email { font-size: 24pt; font-family: 'Raleway', sans-serif; color: #fff; text-decoration: none;
}
footer .email::before { vertical-align: middle; font-family: 'FontAwesome'; content: '\f003'; margin-right: 10px;
}
footer .email:hover { color: #ccc;
}
footer p { text-align: center; font-weight: 100; font-style: italic;
}

Parallax Scroll Prototype - Script Codes JS Codes

/* smooth scroll function * ref: https://css-tricks.com/snippets/jquery/smooth-scrolling/ */
$('a#scroll').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('#parallax').animate({ scrollTop: target.offset().top }, 1000); return false; } }
});
$('#parallax').scroll(function () { if ($('#parallax').scrollTop() > 100) { $("header").addClass("scrolled"); } else { $("header").removeClass("scrolled"); }
});
Parallax Scroll Prototype - Script Codes
Parallax Scroll Prototype - Script Codes
Home Page Home
Developer Woodrow Barlow
Username wbarlow
Uploaded July 31, 2022
Rating 3
Size 5,836 Kb
Views 40,480
Do you need developer help for Parallax Scroll Prototype?

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!

Woodrow Barlow (wbarlow) Script Codes
Create amazing sales emails 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!