--- title: VisualViewport.offsetleft slug: Web/API/VisualViewport/offsetleft translation_of: Web/API/VisualViewport/offsetleft ---
{{SeeCompatTable}}{{APIRef("Visual Viewport")}}
The offsetLeft
read-only property of the {{domxref("VisualViewport")}} interface returns the offset of the left edge of the visual viewport from the left edge of the layout viewport in CSS pixels.
var offsetLeft = VisualViewport.offsetLeft
A double.
Specification | Status | Comment |
---|---|---|
{{SpecName('Visual Viewport','#dom-visualviewport-offsetleft','offsetLeft')}} | {{Spec2('Visual Viewport')}} | Initial definition. |
{{Compat("api.VisualViewport.offsetLeft")}}