这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
lock()
特性为
ScreenOrientation
interface locks the orientation of the containing document to its default orientation.
ScreenOrientation.lock(orientation)
An orientation lock type. One of the following:
"any"
"natural"
"landscape"
"portrait"
"portrait-primary"
"portrait-secondary"
"landscape-primary"
"landscape-secondary"
A
Promise
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Screen Orientation API
The definition of 'lock()' in that specification. |
工作草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
lock
|
Chrome 38 | Edge 79 | Firefox 43 | IE 不支持 No | Opera 25 | Safari 不支持 No | WebView Android 38 | Chrome Android 38 | Firefox Android 43 | Opera Android 25 | Safari iOS 不支持 No | Samsung Internet Android 3.0 |
完整支持
不支持