A
A
AzrailVO2021-01-05 18:13:39
css
AzrailVO, 2021-01-05 18:13:39

How to invert text based on background?

There is text, it is white, the block is fixed, always in the same place. When scrolling the page, there are many places where there is a white background, and somewhere there is a black one. It is necessary that the color of the text smoothly change depending on the background under it. Is it possible to somehow implement this?
There should be two text colors, depending on the background, for example, black text on a light background and vice versa

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2021-01-05
@AzrailVO

https://developer.mozilla.org/ru/docs/Web/CSS/mix-...
Or on js, collecting inverse blocks known in advance and checking their position with the object or calculating colors. In general, there is an expanse of thought.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question