P
P
pegas2020-05-03 15:23:51
JavaScript
pegas, 2020-05-03 15:23:51

How to change block color based on background color?

How to make a txt block change color depending on the block in which it is located? using Intersection Observer API . Down everything works fine, but I can not achieve the same behavior when scrolling to the top https://jsfiddle.net/tkhpoa52/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pegas, 2020-05-03
@1PeGaS

Here is the solution turned out - https://jsfiddle.net/xyj2sver/2/
Suggest your options, it will be interesting to see

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question