js 原生获取一个元素的距离,比较全的api
document.getElementById().getBoundingClientRect()
值的格式为
DOMRECT {
bottom : 500 ,
height : 17 ,
left : 311.5 ,
right : 391.5 ,
top. : 483 ,
width : 80,
x : 311.5,
y. : 483
}