通过offsetTop获取top值,object.offsetTop object.style.top不能获取top值,但可以设置top值 转载于:https://www.cnblogs.com/wuchao/archive/2012/08/01/2618406.html