网页大小: clientWidth和clientHeight。
最快速的方法:getBoundingClientRect() 获得top, right, bottom, left,是获得元素距离viewport的左上角。
获得元素的相对位置:不断向父元素获得offsetHeight和offsetWidth。
获得元素的绝对位置:最后减去 document.docuemnetElement.scrollTop 和 scrollWidth。