这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
onscroll
event handler of the
VisualViewport
interface is called when a viewport is scrolled, i.e. when the
scroll
event is fired.
VisualViewport.onscroll = function(e) { ... }
VisualViewport.onscroll = function(e) {
...
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
Visual Viewport API
The definition of 'onscroll' in that specification. |
草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
onscroll
|
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