offset、client、scroll
offset
1、offsetWidth = width+左右padding+左右border
2、offsetHeight = height+上下padding+上下border
如果父元素没有定位
3、offsetLeft = 距离左侧浏览器的横坐标
4、offsetTop = 距离上侧浏览器的纵坐标
如果父元素有定位
3、offsetLeft = 距离左侧父元素的横坐标
4、offsetLeft = 距离上侧父元素的纵坐标
client
1、clientWidth = width+左右padding
2、clientHeight = height+上下padding
3、clientLeft = border-left
4、clientTop = border-top
scroll
1、scrollWidth = width + 滚动条卷去的width
2、scrollHeight = height + 滚动条卷去的height
3、scrollLeft = 滚动条卷去的width
4、scrollTop = 滚动条卷去的height