Gradient Transitions Between Sections

Size
3,329 Kb
Views
18,216

How do I make an gradient transitions between sections?

Create a smooth gradient transition from one section background to another. Gives the page a softer look. Soften the transition by adding height to the transition sections.. What is a gradient transitions between sections? How do you make a gradient transitions between sections? This script and codes were developed by Brian Haferkamp on 10 October 2022, Monday.

Gradient Transitions Between Sections Previews

Gradient Transitions Between Sections - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Gradient Transitions Between Sections</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>
<nav> <ul> <li><a href="#section-1">Section 1</a></li> <li><a href="#section-2">Section 2</a></li> <li><a href="#section-3">Section 3</a></li> </ul>
</nav>
<section class="section" id="section-1"> <div class="section-inner"> <h1>Some headline here</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt porro, omnis! Aperiam et soluta, iure tempora aliquid consequuntur at quidem? Sunt quidem odit obcaecati nisi perferendis, ex tenetur asperiores voluptatem.</p> </div>
</section>
<section class="transition transition-1"></section>
<section class="section" id="section-2"> <div class="section-inner"> <h1>Some headline here</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt porro, omnis! Aperiam et soluta, iure tempora aliquid consequuntur at quidem? Sunt quidem odit obcaecati nisi perferendis, ex tenetur asperiores voluptatem.</p> </div>
</section>
<section class="transition transition-2"></section>
<section class="section" id="section-3"> <div class="section-inner"> <h1>Some headline here</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt porro, omnis! Aperiam et soluta, iure tempora aliquid consequuntur at quidem? Sunt quidem odit obcaecati nisi perferendis, ex tenetur asperiores voluptatem.</p> </div>
</section> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Gradient Transitions Between Sections - Script Codes CSS Codes

body { text-align: center; color: white;
}
h1 { margin: 0;
}
nav { position: fixed; background: white; width: 100%; box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}
ul { list-style: none; padding: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
ul li { padding: 0 1rem;
}
.section { height: 100vh; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
.section-inner { padding: 3rem;
}
#section-1 { background: #037ED2;
}
#section-2 { background: #0CA2BB;
}
#section-3 { background: #037ED2;
}
.transition { height: 20vh;
}
.transition-1 { background: -webkit-linear-gradient(#037ed2, #0ca2bb); background: linear-gradient(#037ed2, #0ca2bb);
}
.transition-2 { background: -webkit-linear-gradient(#0ca2bb, #037ed2); background: linear-gradient(#0ca2bb, #037ed2);
}

Gradient Transitions Between Sections - Script Codes JS Codes

// Smooth Scrolling
$('a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top }, 1000); return false; } } });
Gradient Transitions Between Sections - Script Codes
Gradient Transitions Between Sections - Script Codes
Home Page Home
Developer Brian Haferkamp
Username brianhaferkamp
Uploaded October 10, 2022
Rating 4
Size 3,329 Kb
Views 18,216
Do you need developer help for Gradient Transitions Between Sections?

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!

Brian Haferkamp (brianhaferkamp) Script Codes
Create amazing blog posts with AI!

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!