Text Colour Change Between Sections


Ever seen those divs and text secitons that follow you down the page, but then switch colours when the background colour of the section changes? It's actually a lot more simple to apply then you might think.

Add this code to the <head> in your project settings:

.text-class-name {
mix-blend-mode: difference;

You'll want to use the class of the text element or div element that you want to change colour as you move between sections.

See an Example Website

Other Code Snippets