--- title: Window.visualViewport slug: Web/API/Window/visualViewport translation_of: Web/API/Window/visualViewport ---
{{SeeCompatTable}}{{APIRef("Visual Viewport")}}
{{domxref("Window")}} 接口的visualViewport只读属性返回一个{{domxref("VisualViewport")}}对象,该对象表示给定窗口的可视视口。
var visualViewport = Window.visualViewport
一个 {{domxref("VisualViewport")}} 对象。
Specification | Status | Comment |
---|---|---|
{{SpecName('Visual Viewport','#dom-window-visualviewport','visualViewport')}} | {{Spec2('Visual Viewport')}} | Initial definition. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOpera(47)}} | {{CompatUnknown}} |
Feature | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support | {{CompatChrome(60)}} | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOperaMobile(47)}} | {{CompatUnknown}} |