Simple Parallax Scroll
How do I make an simple parallax scroll?
What is a simple parallax scroll? How do you make a simple parallax scroll? This script and codes were developed by Corbin on 26 September 2022, Monday.
Simple Parallax Scroll - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple Parallax Scroll</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="home" data-type="background" data-speed="40" class="pages"> <h1><img src="http://img3.wikia.nocookie.net/__cb20140401130241/logopedia/images/6/6b/The_Office_NBC_logo.png"></h1>
</div>
<div id="about" data-type="background" data-speed="0" class="pages"> <h1>THE Dwight Fart Schrute</h1>
</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>
Simple Parallax Scroll - Script Codes CSS Codes
#home { background: url("http://www.hercampus.com/sites/default/files/2015/04/26/Summer_1.jpg") repeat 50% 0 fixed; min-height: 900px; width: 100%; margin: 0 auto; position: relative; background-size: cover;
}
#home h1 { width: 100%; top: 100px; position: absolute; text-align: center; color: #fff; font-size: 29px;
}
#home h1 img { height: 158px; position: absolute; left: 0; right: 0; text-align: center; top: 350px; margin: 0 auto; width: 50%; color: #fff; text-shadow: 0 1px 2px #000;
}
#about { background: url('https://theofficescranton.files.wordpress.com/2012/09/jim-as-dwight3.png') 50% 0 no-repeat; min-height: 900px; width: 100%; margin: 0 auto; position: relative;
}
#about h1 { height: 458px; position: absolute; right: -200px; text-align: center; top: 350px; font-size: 45px; font-family: Helvetica; width: 100%; color: #fff; text-shadow: 0 1px 2px #000;
}
Simple Parallax Scroll - Script Codes JS Codes
$('div[data-type="background"]').each(function(){ var $bgobj = $(this); // assigning the object $(window).scroll(function() { var yPos = -($window.scrollTop() / $bgobj.data('speed')); // Put together our final background position var coords = '50%' + yPos + 'px'; // Move the background $bgobj.css({ backgroundPosition: coords, 'opacity': .5 }); });
});
Developer | Corbin |
Username | corbinmj16 |
Uploaded | September 26, 2022 |
Rating | 3 |
Size | 2,321 Kb |
Views | 18,216 |
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 |
Red Box Move on Mouse Coordiantes | 1,728 Kb |
JS Arrays | 1,913 Kb |
Vue.js To-do List | 1,736 Kb |
Diabetes Calculator | 1,874 Kb |
Javascript Ternary Operator | 1,988 Kb |
Drawing App with Canvas | 3,340 Kb |
Vue.js Search | 1,811 Kb |
JS Find total and using textContent | 1,610 Kb |
Tab area | 1,978 Kb |
Slider with arrows and dots | 3,897 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 |
Mostly Fluid | Mccreath | 3,308 Kb |
Simple Linear Regression with Editable Table | Melatonind | 3,264 Kb |
CSS Social Media Icon | TychoBlender | 3,871 Kb |
Svg animation draw | SzymonDziewonski | 5,545 Kb |
A form arranged using automatic placement. | Vikasford | 2,103 Kb |
Week7 replicate | Hwcasis | 1,620 Kb |
ECharts Version 3.0 - Bar Marker Chart | WebCodePro | 2,726 Kb |
CSS3 Butterfly | Timohausmann | 3,430 Kb |
Pomodoro Clock | Yas46 | 3,328 Kb |
HTM5 picture dropzone | Jaysalvat | 2,576 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!