document.getElementById('filter').getBoundingClientRect().top
其他的都是垃圾
本文介绍了一种使用JavaScript的方法来获取页面中元素的位置信息,通过document.getElementById和getBoundingClientRect方法结合使用,可以精确得到元素的top值。
document.getElementById('filter').getBoundingClientRect().top
其他的都是垃圾
5274

被折叠的 条评论
为什么被折叠?