I have a simple layout consisting of three full height divs and a fixed header bar.
You can use mix-blend-mode:difference
body,
html {
padding: 0;
margin: 0;
}
.header {
position: fixed;
width: 100%;
height: 50px;
margin: 20px;
color:#fff;
mix-blend-mode: difference;
}
.section1,
.section2,
.section3{
background: black;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.section2 {
background: white;
color:#000;
}
Header Content
Section One Content
Section Two Content
Section Three Content