Why offsetTop returns different value in Chrome and IE

半世苍凉 提交于 2019-12-11 18:32:37

问题


We are working on angular application in which we need to show one element on top of the page after browser's scroll reach to that element.

Is there any CSS issue which is impacted.

Below is the code.

elementRef.nativeElement.offsetParent.offsetTop;

来源:https://stackoverflow.com/questions/54604098/why-offsettop-returns-different-value-in-chrome-and-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!