Parallax Background Scroll
How do I make an parallax background scroll?
What is a parallax background scroll? How do you make a parallax background scroll? This script and codes were developed by Trenton on 22 November 2022, Tuesday.
Parallax Background Scroll - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Parallax Background Scroll</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="imgHolder"> <img src='http://tamingthewild.sitewrench.com/SiteFiles/2411/css/images/mist.png'/> <div class='header'>FROM THE BOOK</div> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Parallax Background Scroll - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Roboto:400,100,300,700,900);
html{ height:1500px;
}
.imgHolder{ height:30em; overflow:visible; position:relative;
}
.imgHolder img{ width:100%; min-height:500px; max-width:1500px; left:50%; -webkit-transform: translate(-50%, -10%); -ms-transform: translate(-50%, -10%); transform: translate(-50%, -10%); position:absolute;
}
.header{ position:absolute; font-size:2em; font-weight:100; background:rbga(22,41,35,0.5); color:#000; letter-spacing:0.2em; top:50%; left:50%; width:80%; font-family:Roboto !important; text-align:center; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
}
Parallax Background Scroll - Script Codes JS Codes
$(window).scroll(function(){ var position = $(this).scrollTop(); $('.imgHolder img').css({top:position/2});
});
![Parallax Background Scroll - Script Codes](http://shots.codepen.io/tlelkins2020/pen/qZoeJN-512.jpg)
Developer | Trenton |
Username | tlelkins2020 |
Uploaded | November 22, 2022 |
Rating | 3 |
Size | 2,067 Kb |
Views | 20,240 |
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 |
Sticky CTA Button | 2,813 Kb |
Full Screen Material Menu | 3,906 Kb |
Auto Centered Sections | 1,862 Kb |
Animated Top Menu | 2,779 Kb |
Changing Background Color on Scroll | 3,323 Kb |
A Pen by Trenton | 4,102 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 |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
Transition | Shayhowe | 1,632 Kb |
Multicolumns 2 | Raphaelgoetter | 1,857 Kb |
Layout 11 | Altynai | 1,690 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
Tail rose iris lined | Kbrtrm | 1,846 Kb |
Horizontal scroll fixed element | HerrSerker | 0 Kb |
03 - CSS Variables | Run-time | 2,682 Kb |
CSS Grid Overlay | Cliffpyles | 3,090 Kb |
Apex Calculator | Michaelwnelson | 2,370 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!