这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
offsetLeft
只读特性在
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.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Visual Viewport API
The definition of 'offsetLeft' in that specification. |
草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
offsetLeft
|
Chrome 61 | Edge 79 | Firefox 63 | IE No | Opera 48 | Safari 13 | WebView Android 61 | Chrome Android 61 |
Firefox Android
68
|
Opera Android 45 | Safari iOS 13 | Samsung Internet Android 8.0 |
完整支持
不支持
实验。期望将来行为有所改变。
用户必须明确启用此特征。
VisualViewport