Can the text on a floating element show red when the background is white and white when the background is red?

want to use the mix-blend-mode:difference implementation in ccs3 to be red on a white background, but black on a red background.
only this effect is close to


mix-blend-mode: difference; is mixed mode-difference, and cannot specify color value
css does not support conditional judgment. You can use precompilation such as less or scss


public static void main
Menu