--- 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.

Syntax

var offsetLeft = VisualViewport.offsetLeft

Value

A double.

Specifications

Specification Status Comment
{{SpecName('Visual Viewport','#dom-visualviewport-offsetleft','offsetLeft')}} {{Spec2('Visual Viewport')}} Initial definition.

Browser compatibility

{{Compat("api.VisualViewport.offsetLeft")}}