CSS only simple parallax scroll
How do I make an css only simple parallax scroll?
Forked from Hendry Sadrak's Pen CSS only simple parallax scroll.. What is a css only simple parallax scroll? How do you make a css only simple parallax scroll? This script and codes were developed by Stan Williams on 08 September 2022, Thursday.
CSS only simple parallax scroll - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS only simple parallax scroll</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/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="parallax"> <div class="group"> <div class="layer background"></div> <div class="layer content"> <div class="wrap"> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> </div> </div> </div> <div class="group"> <div class="layer background"></div> <div class="layer content"> <div class="wrap"> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> </div> </div> </div> <div class="group"> <div class="layer background"></div> <div class="layer content"> <div class="wrap"> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> </div> </div> </div> <div class="group"> <div class="layer background"></div> <div class="layer content"> <div class="wrap"> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> </div> </div> </div> <div class="group"> <div class="layer background"></div> <div class="layer content"> <div class="wrap"> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> </div> </div> </div> <div class="group"> <div class="layer background"></div> <div class="layer content"> <div class="wrap"> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> </div> </div> </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>
CSS only simple parallax scroll - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,600);
html, body { background-color: #2c3e50; font-family: 'Open Sans', sans-serif; -webkit-font-smoothing: antialiased;
}
.parallax { height: 500px; height: 100vh; overflow-x: hidden; overflow-y: auto; -webkit-perspective: 300px; perspective: 300px; position: relative;
}
.parallax .group { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; position: relative; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transition: -webkit-transform 0.5s; transition: -webkit-transform 0.5s; transition: transform 0.5s; transition: transform 0.5s, -webkit-transform 0.5s;
}
.parallax .group .layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0;
}
.parallax .group .content { -webkit-transform: translateZ(0); transform: translateZ(0); z-index: 4; text-align: center;
}
.parallax .group .content .wrap { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); position: absolute; right: 0; bottom: 0; color: #fff; font-size: 2em;
}
.parallax .group .content-front { -webkit-transform: translateZ(90px) scale(0.7); transform: translateZ(90px) scale(0.7); z-index: 1;
}
.parallax .group .background { -webkit-transform: translateZ(-300px) scale(2); transform: translateZ(-300px) scale(2); z-index: 3; background-size: cover; background-repeat: no-repeat;
}
.parallax .group .background-deep { -webkit-transform: translateZ(-600px) scale(3); transform: translateZ(-600px) scale(3); z-index: 2;
}
.group:nth-child(1) .background { background-image: url(https://38.media.tumblr.com/2c1a9d53169f1eca25b2a0b8238744c9/tumblr_n9hxdqatsK1st5lhmo1_1280.jpg);
}
.group:nth-child(2) .background { background-image: url(https://38.media.tumblr.com/e77ef190ff20487acedb1d664a535c1b/tumblr_n8zlzxbFUT1st5lhmo1_1280.jpg);
}
.group:nth-child(3) .background { background-image: url(https://38.media.tumblr.com/e6c1c887ba8e24a855351940bcd3c343/tumblr_n8zm44LBpl1st5lhmo1_1280.jpg);
}
.group:nth-child(4) .background { background-image: url(https://38.media.tumblr.com/4e9d8c075b15f5922682bfaa13a8125c/tumblr_n7yhezarqF1st5lhmo1_1280.jpg);
}
.group:nth-child(5) .background { background-image: url(http://farm2.staticflickr.com/1163/792191425_ac00528d38_o_d.jpg);
}
.group:nth-child(6) .background { background-image: url(https://31.media.tumblr.com/cd40dba26eabfc0901892be37f207cf6/tumblr_n7fgl3sQS61st5lhmo1_1280.jpg);
}
CSS only simple parallax scroll - Script Codes JS Codes
$('.group').css('height', $(window).innerHeight())

Developer | Stan Williams |
Username | Stanssongs |
Uploaded | September 08, 2022 |
Rating | 3 |
Size | 3,708 Kb |
Views | 34,391 |
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 |
3D Book | 7,405 Kb |
HTML5 Player with Flash fallback for non supporting browsers. | 3,484 Kb |
Animated button effects using jquery, css, javascript and effeckts.js | 2,862 Kb |
Responsive Company Page | 9,666 Kb |
3D Hover Effect for Images | 4,341 Kb |
Pure CSS3 breadcrumb navigation, pixel perfect | 3,958 Kb |
Cursor following menu demo | 8,080 Kb |
Off-Canvas LeftResponsive Page with hidden music player widget in left sidebar | 5,692 Kb |
Horizontal Menu Demo | 4,780 Kb |
Animated Digital Flip Clock | 2,423 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 |
Lecture 1 | Law | 0 Kb |
Shape Outside - Polygon | Stacy | 3,954 Kb |
Scroll using CSS | Casperovic | 2,159 Kb |
Beautiful canvas stars | Matths | 2,399 Kb |
Slide In Panel | Vikvarg | 2,811 Kb |
Practice using Wixel | Emnk | 3,057 Kb |
SlideupBoxes | Gavra | 23,772 Kb |
Nice responsive team page | Infomiho | 3,139 Kb |
CSS Colors | Alexpate | 2,232 Kb |
Week7 replicate | Hwcasis | 1,620 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!