这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
onresize
event handler of the
VisualViewport
interface is called when a viewport is resized, i.e. when the
resize
event is fired.
VisualViewport.onresize = function(e) { ... }
VisualViewport.onresize = function(e) {
...
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
Visual Viewport API
The definition of 'onresize' in that specification. |
草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
onresize
|
Chrome
62
|
Edge 79 | Firefox 66 | IE No |
Opera
49
|
Safari 13 |
WebView Android
62
|
Chrome Android
62
|
Firefox Android
68
|
Opera Android
46
|
Safari iOS 13 |
Samsung Internet Android
8.0
|
完整支持
不支持
实验。期望将来行为有所改变。
用户必须明确启用此特征。
VisualViewport
onresize
onscroll