jq中offset().left和offset().top获取的是相对于整个文档左上角的偏移。
而用$(selector).position().left和.top 取到的则是相对于selector父元素的偏移。