Slanted Div, Fixed Header
How do I make an slanted div, fixed header?
Skewed divs and parallax effect created by fixed header. Simple layout and instructions for modification in the JS!. What is a slanted div, fixed header? How do you make a slanted div, fixed header? This script and codes were developed by Andrew Bales on 03 October 2022, Monday.
Slanted Div, Fixed Header - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Slanted Div, Fixed Header</title> <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="blue-bg"></div>
<div class="white-bg shadow"></div>
<div class="content"> <h1>Slanted & Enchanted</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin magna ex, elementum id convallis eu, elementum id justo. Maecenas dictum sagittis leo, ut ultrices risus mollis vitae. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus eu lectus felis. Vivamus eget velit erat. Vivamus condimentum augue sed lacus viverra imperdiet. Etiam quis lectus non libero hendrerit porta. In sit amet molestie lacus. Praesent ultricies, lectus eget porta porttitor, sem sapien facilisis arcu, eu tincidunt nulla odio ac ipsu.</p> <p>Praesent eu arcu convallis, faucibus turpis eu, rutrum nisi. Integer rutrum ipsum at aliquam consequat. In dignissim lorem nibh, nec iaculis est fermentum vitae. Maecenas sodales, nunc eget lacinia volutpat, nibh mi lobortis leo, id varius urna tellus ut magna. Sed porttitor nunc et luctus efficitur. Nam sit amet congue nulla. Praesent dapibus erat arcu, at scelerisque arcu faucibus vel. Morbi blandit venenatis elit. Nam feugiat bibendum suscipit. Donec viverra eu lorem eu venenatis. Nullam posuere nulla id libero rutrum venenatis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam molestie ac velit vel blandit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
</div> <script src="js/index.js"></script>
</body>
</html>
Slanted Div, Fixed Header - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Montserrat);
@import url("https://fonts.googleapis.com/css?family=Open+Sans");
h1 { font-family: "Montserrat", sans-serif;
}
p { font-family: "Open Sans", sans-serif; text-align: justify;
}
.blue-bg { position: fixed; background: url(https://www.mangoafricansafaris.com/sites/www.mangoafricansafaris.com/files/styles/original/public/gallery/chumbe_bungallow_and_forest_overview_oskar_henriksson.jpg?itok=UXkgUC5y); background-size: cover; background-color: #58aff6; top: 0; height: 400px; width: 100vw; z-index: -1;
}
.white-bg { position: absolute; top: 0; background-color: #fff; min-height: 500px; margin: 210px 0px; width: 100vw; height: 100vh; -webkit-transform: skewY(5deg); transform: skewY(5deg); z-index: -1;
}
.content { position: absolute; top: 0; margin: 250px 10vw; max-width: 60vw; background-color: #fff;
}
.shadow { box-shadow: -2px -5px 5px 0px rgba(0, 0, 0, 0.3);
}
Slanted Div, Fixed Header - Script Codes JS Codes
/*-- Notes:
Header IMG: Change image by swapping out url in .blue-bg Make solid color by removing 'background' properties
Slant angle: Modify skewY degree in .white-bg
Top distance: Slant distance from top = margin in .white-bg Text distance from top = margin in .content
Fixed Header: 'turn off' with "position: absolute" in .blue-bg
--*/
Developer | Andrew Bales |
Username | agbales |
Uploaded | October 03, 2022 |
Rating | 4.5 |
Size | 3,455 Kb |
Views | 82,984 |
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 |
Daily Show Guest Stats | 3,335 Kb |
Polo, the flying squirrel | 2,445 Kb |
Cessna | 2,407 Kb |
Simon | 4,305 Kb |
Adopt Sweater Kitten | 1,883 Kb |
Video Portfolio | 3,390 Kb |
Jigsaw | 3,264 Kb |
Howie | 2,856 Kb |
ACRE Books | 3,927 Kb |
Open Weather Map API | 3,629 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 |
Vertical Pan Hammer.js example | Jtangelder | 2,144 Kb |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
CSS Hover Effects | Alen | 3,613 Kb |
Blog Concept - Single Post | Marionebl | 9,603 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
CSS3 Button Examples | Volusion | 3,377 Kb |
A Pen by Kevin | Kevinkenger | 2,642 Kb |
Parallax with only CSS | Thulioph | 2,297 Kb |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 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!