摘要: getBoundingClientRect这个API的兼容性非常好 http://caniuse.com/#search=getBoundingClientRect 该API可以获取元素相对于当前屏幕左上角的距离,所以可以判断当前元素是否在屏幕内,很方便的实现懒加载 具体demo如下 ... 阅读全文
posted @ 2017-03-01 12:45 cococe 阅读(273) 评论(0) 推荐(0) 编辑