Parallax scrolling
How do I make an parallax scrolling?
Simple one page website with multiple paralax scrolling backgrounds. Nice effect for your personal portfolio.. What is a parallax scrolling? How do you make a parallax scrolling? This script and codes were developed by Chris on 01 December 2022, Thursday.
Parallax scrolling - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Parallax scrolling</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <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 class="home" data-type="background" data-speed="2" class="pages"> <div class="content"> <h2 class="articleTitle textShadow">One page <span class="dark">website</span></h2> <h3 class="articleSubTitle textShadow">With parallax scrolling backgrounds</h3> </div>
</div>
<div class="about boxShadow" data-type="background" data-speed="2" class="pages"> <div class="content"> <h2 class="articleTitle textShadow">About <span class="dark">us</span></h2> <h3 class="articleSubTitle textShadow">Who are we and what do we do?</h3> </div>
</div>
<div class="contact boxShadow" data-type="background" data-speed="2" class="pages"> <div class="content"> <h2 class="articleTitle textShadow">Contact <span class="dark">me</span></h2> <h3 class="articleSubTitle textShadow">Have questions? Contact us!</h3> </div>
</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 scrolling - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900);
@import url(https://fonts.googleapis.com/css?family=Patua+One);
@import url(https://fonts.googleapis.com/css?family=Armata);
body { font-family: 'Roboto', sans-serif; font-size: 14px; line-height: 20px; font-weight: 300;
}
p { margin-bottom: 2em;
}
.textShadow { text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.5);
}
.boxShadow { -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5); box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
}
.home { position: relative; margin: 0 auto; width: 100%; height: 600px; background: url("http://www.sanderkeurentjes.nl/portfolio/img/bg-home.jpg") 50% 0 repeat fixed;
}
.about { position: relative; margin: 0 auto; width: 100%; height: 600px; background: url("http://xdesigns.net/wp-content/uploads/2013/07/4-grass-wallpaper.jpg") 50% 0 no-repeat;
}
.contact { position: relative; margin: 0 auto; width: 100%; height: 600px; background: url("http://wallpoper.com/images/00/40/30/48/nature-water_00403048.jpg") 50% 0 repeat fixed;
}
.content { position: absolute; top: 50px; width: 80%; height: 458px; padding: 0 10%; text-align: center;
}
.articleTitle { margin-bottom: 0.25em; font-family: 'Patua One', cursive; font-size: 8em; line-height: 1em; color: #fff;
} .articleTitle .dark { color: #333; }
.articleSubTitle { font-family: 'Armata', sans-serif; font-size: 3em; line-height: 1em; color: #fff;
}
Parallax scrolling - Script Codes JS Codes
$(document).ready(function(){ var $window = $(window); $('div[data-type="background"]').each(function(){ var $bgobj = $(this); $(window).scroll(function() { var yPos = -($window.scrollTop() / $bgobj.data('speed')); var coords = '50% '+ yPos + 'px'; $bgobj.css({ backgroundPosition: coords }); }); });
});
Developer | Chris |
Username | leetech |
Uploaded | December 01, 2022 |
Rating | 3 |
Size | 2,628 Kb |
Views | 12,144 |
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 |
Bootstrap Features | 2,467 Kb |
Responsive business | 3,412 Kb |
Split scroll | 2,110 Kb |
A Pen by Chris | 2,765 Kb |
Client list | 1,683 Kb |
Bootstrap Carousel | 2,679 Kb |
JUST A BS 3 THUMBNAIL SLIDER | 2,270 Kb |
Just some more hover effects | 2,051 Kb |
Triangle bullets | 1,727 Kb |
BASIC INFOGRAPHIC THING | 2,472 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 |
Table Exercise | Fresco | 9,585 Kb |
Drill-down Map | Good886 | 8,484 Kb |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
CSS 3D Radio buttons | Andreasnylin | 1,650 Kb |
Popover Example | Seanboom | 2,429 Kb |
Loading Bar | Jaradlight | 2,333 Kb |
Alter bg opacity on hover... | Chrisboon27 | 2,054 Kb |
Background Images | Jooonebug | 2,100 Kb |
A Pen by Michael Parenteau | Michaelparenteau | 2,133 Kb |
Pure CSS candle light animation by One element | Ksksoft | 2,193 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!