IntersectionObserver

监听元素是否出现在可视区域

优势:

  • 判断精准

  • 支持水平方向

参见:

Last updated