📌  相关文章
📜  js 中的偏移量 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:33.484000             🧑  作者: Mango

代码示例1
var d = document.getElementById("div1");
var topPos = d.offsetTop;
 
if (topPos > 10) {
  // object is offset more
  // than 10 pixels from its parent
}