Hi, I’m trying to use blending mode on the text of my menu but without any results. I’d like it to change to “difference” when it hovers over any widget but the text remains the same color. I’ve inserted this code with the text’s ID in the CSS tab:
I think if you have any animation assigned to the element you want to add the blend-mode to this will not work.
With every animation another parent div is created and you would need to assign the mix-blend onto that. This is possible, but you would need js/jquery to do it.
I have tried to change the code like you said but somehow now, things are not working.
It seems like the whole page gets put in difference and freezes after 1000ms
Im sorry, I think thats because i havent published it.
Yeah exactly. The widget has an animation for opacity and position. The animations are triggered by clicking on another widget. Also the widget is used as a link to another page when u click on it.
Okay i deleted one .parent() and I repeated the js line for the 4 menu items, but still no luck…
Anything else I could do?
(Edit 1)
I have no idea how but it randomly worked once on one word, and then when I preview again, it is not working eventhough I didn’t change a single thing.
(Edit 2)
Now it seems that sometimes it works, but mostly I doesnt
If I want to do the same for other pages it either doesn’t work there or on the previous page, depends on what page I changed my code the last time, for example if I I change something whilst im on my landing page the code works there, but not on the other page and the other way round…
I have tried to rewrite the script for every page but that didn’t do anything.
well, this might be because the elements on your subpages are not accessible from the main page on which you are using the JS code to set the css mixblendmode style.
This is logic, as the elements from the subpage ar enot been loaded on the mainpage.
You would need to execute the script also on your subpages.
So just copy and paste your code into a codewidget on ech subpage.
I have done that but the problem stays the same. The texts that are not on my main page are not animated so I thought that might be a problem so I tried to animate them but no difference.
It seems that if the code on my subpages is doing the opposite, by that I mean that it works for the few seconds I set in the Set-Timeout and then the widget freezes and goes behind the images.
the problem is, that the parent container (fixed-position-container) of your subpage element “see more pictures” has also the mix-blend-mode: difference; which makes it looking like its in the back.
So make sure, that for this element only use one method: the pure css way would be to prefer here, as the element doesn´t has a animation.
So your idea, that it isn´t working because of a double blendmode is kind of right.