此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

Window:orientation 属性

Deprecated

Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.

返回视口相对于设备自然方向的旋转角度(以 90 度为增量的度数)。

它只可能取 -90090180 这四个值。正值表示逆时针方向,而负值表示顺时针方向。

此属性已弃用。请改用 window.screen 属性上的 Screen.orientation 属性。