jeudi 21 février 2019

Intersection Observer API: Observe the center of the viewport

I am trying to observe the intersection at center of viewport, i have tried with passing negative values in rootMargin

rootMargin: '-45% 10% -45%'

but it doesn't seems to be working properly.

My requirement is to observe the intersection when my element is reaching the center of screen.

Thanks




Aucun commentaire:

Enregistrer un commentaire