Background Color Morph: Transition Between Background Colors On Scroll

Background Color Morph: Transition Between Background Colors On Scroll

Description:

Background Color Morph is a small (2kb minified) JavaScript library that applies a transition effect to background colors when scrolling down or up the webpage.

How to use it:

Import the JavaScript bg-color-morph.min.js and Stylesheet bg-color-morph.css into the document.

1<link href="dist/bg-color-morph.css" rel="stylesheet">
2<script src="dist/bg-color-morph.min.js"></script>

Add the required CSS class bg-morph to the target container.

1<section class="bg-morph">
2Content here
3</section>

Set the start and end colors in hex.

1<section class="bg-morph"
2data-start-color="#f7b733"
3data-end-color="#fc4a1a">
4Content here
5</section>

Set the start/end trigger points.

1<section class="bg-morph"
2data-start-color="#f7b733"
3data-end-color="#fc4a1a"
4data-start-trigger="top"
5data-end-trigger="middle">
6Content here
7</section>

Demo: Link

Download: Github

Fancy you stumbling on my piece of the internet. Bonjour!

My name is Anmol and I'm the Blogger-In-Chief of this joint & working as the Chief Technology Officer at Azoora, Inc. I'm putting up my views here trying to help creative solopreneurs, developers & designers build their business using the power of websites, apps & social media, this, is, my jam.

If you're looking to start your own online business with a professional high quality website or mobile app, just get in touch. I'd be more than happy to assist.

SKYPE | FACEBOOK | LINKEDIN | TWITTER | EMAIL

One comment

Leave a Reply to Gayle Cummings Cancel reply

Your email address will not be published.