I have spent a good chunk of my time to figure this out. In case you have a div with some margin on the top. The body
position as per the chrome dev tools start from the point where the div starts from. Basically it doesn't consider the margin for the offset. Though it does considers the same for height calculation.
Eg -
<body>
<div> my content my content my content my content my content my content my content my
</div>
</body>
I have created a jsFiddle for the same -- http://jsfiddle.net/tusharmathur/kW4v4/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…