Code on animation

Hey! It is very simple - looking like this (on the pic).
And animation is pretty easy as well - just move on scroll

I used this code:
[data-id=“62fd915b02ea890013431e5f”] {
mix-blend-mode: difference;
}

Should I add something to it that it will work with animation?