摘要:
document.documentElement.getBoundingClientRect例:doucment.getelementById('a').getBoundingClientRect();有4个方法,top, right, bottom ,left 分别返回被选取元素每条边距离浏览器左和上的距离。理论上是这个样的dom.getBoundingClientRect().left+dom.offsetWidth==dom.getBoundingClientRect().right; 阅读全文