VisualViewport.offsetTop
The offsetTop
read-only property of the VisualViewport
interface returns the offset of the top edge of the visual viewport from the top edge of the layout viewport in CSS pixels.
Syntax
var offsetTop = VisualViewport.offsetTop
Value
A double.
Specifications
Specification |
---|
Visual Viewport API # dom-visualviewport-offsettop |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
offsetTop |
61 |
79 |
91
63
|
No |
48 |
13 |
61 |
61 |
68
63
|
45 |
13 |
8.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/offsetTop