Parallax with only CSS
How do I make an parallax with only css?
Parallax with only CSS. What is a parallax with only css? How do you make a parallax with only css? This script and codes were developed by Thulio Philipe on 09 January 2023, Monday.
Parallax with only CSS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Parallax with only CSS</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> <!-- Four containers for setting the background images -->
<div class="parallax"> <div class="bg__foo">foo</div> <div class="bg__bar">bar</div> <div class="bg__baz">baz</div> <div class="bg__bazz">bazz</div>
</div>
<!--Demo:
http://davidwalsh.name/parallax--> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Parallax with only CSS - Script Codes CSS Codes
[class*="bg__"] { height: 50vh; text-indent: -9999px; /* fix background */ background-attachment: fixed; /* center it */ background-position: center center; /* Scale it nicely to the element */ background-size: cover; /* just make it look a bit better ;) */
}
[class*="bg__"]:nth-child(2n) { box-shadow: inset 0 0 1em #111;
}
.bg__foo { background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/30354/parallax1.jpg);
}
.bg__bar { background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/30354/parallax2.jpg);
}
.bg__baz { background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/30354/parallax3.jpg);
}
.bg__bazz { height: 100vh; background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/30354/parallax1.jpg);
}
Developer | Thulio Philipe |
Username | thulioph |
Uploaded | January 09, 2023 |
Rating | 3 |
Size | 2,297 Kb |
Views | 8,096 |
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 |
Parallax with only CSS3 | 3,456 Kb |
Pagination without plugin jQuery | 4,000 Kb |
Google static map to Base64 | 2,058 Kb |
Menu - Forks Meal Planner | 5,432 Kb |
CSS Gradient border | 3,691 Kb |
Api notify | 2,045 Kb |
Tilt Effect | 10,189 Kb |
A Pen by Thulio Philipe | 3,941 Kb |
Custom Google Maps API | 2,965 Kb |
Select with plugin | 2,011 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 |
Minimal Menu | Achudars | 3,430 Kb |
Mega menu | DimaZubkov | 5,066 Kb |
Brown by pure CSS, no image, no javascript | Aaronchuo | 2,652 Kb |
A Pen by Jason Kinney | Jason-kinney | 1,980 Kb |
CSS Patterns | Alyda | 3,953 Kb |
SCSS Simple Animated Drop-In | Danwarfel | 2,175 Kb |
Starfield using KineticJS | Asp | 3,512 Kb |
Birthday Party Starter | Aussieyang | 1,629 Kb |
Multi-step GSAP animation | Acacheung | 2,668 Kb |
LeMandinque | Aadesida | 9,046 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!