VisualViewport.offsetleft

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

The offsetLeft read-only property of the 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
CSSOM View Module
# dom-visualviewport-offsetleft

Browser compatibility

BCD tables only load in the browser