I know this has been addressed previously, but I’m still having trouble with it.
I’m a very new beginner to Webflow and using custom code, and I’m trying to have the text color change depending on its background using this code that was previously shared:
.nav-bar-main {mix-blend-mode: difference;}
Right now, I’ve named my nav bar “nav-bar-main” and have tried inserting this code into the page’s custom code before the < /body> tag. I’m not sure what I’m doing wrong, especially with something that seems so straightforward and simple. If anyone could take a look at my set-up, I would greatly appreciate it!
Hello @Shelley_Tsui, you got the right code but it is on the wrong place. So what you have to do is delete the code from the page settings, on your page body add an embed element, on the embed element console copy the code that you already have(the code that is on the before /body section) and click save and close and it should work for you. Let me know if you have any questions.
Hi Pablo! Thank you for your reply, I think I put it in the correct place after reading your suggestion but it’s still not working. Would you be able to check again and see if I did it correctly?
Hey @Shelley_Tsui and @Stan, yes so Stan was right you can’t see the difference even though the code is working because when using the text color that you have the change is minimal. Sheylley, the way you have it now is working, however, I will suggest you to change your nav bar text to white to really see the blend mode working properly.