问题:
Is there an efficient way to tell if a DOM element (in an HTML document) is currently visible (appears in the viewport )? 有没有一种有效的方法来判断DOM元素(在HTML文档中)当前是否可见(显示在视口中 )?
(The question refers to Firefox) (问题是指Firefox)
解决方案:
参考一: https://stackoom.com/question/WFz/如何判断DOM元素在当前视口中是否可见参考二: https://oldbug.net/q/WFz/How-to-tell-if-a-DOM-element-is-visible-in-the-current-viewport
来源:oschina
链接:https://my.oschina.net/u/4432649/blog/4319688