JavaScript/wheel:修订间差异
来自康健生活
| 第5行: | 第5行: | ||
* mousewheel (firefox 不支持,非标准弃用) | * mousewheel (firefox 不支持,非标准弃用) | ||
* DOMMouseScroll (只有 firefox 支持,非标准弃用) | * DOMMouseScroll (只有 firefox 支持,非标准弃用) | ||
== mousewheel == | |||
触摸板的双指操作行为触发 mousewheel 事件。 | |||
== 属性 == | == 属性 == | ||
2022年3月9日 (三) 14:41的版本
引言
滚动事件
组成
鼠标的滚轮事件主要有两种:
- mousewheel (firefox 不支持,非标准弃用)
- DOMMouseScroll (只有 firefox 支持,非标准弃用)
mousewheel
触摸板的双指操作行为触发 mousewheel 事件。
属性
- deltaX
- deltaY
- wheelDelta
- deltaMode
- detail
触摸板
触摸板逻辑包括双指在触摸板上持续滑动、双指滑动后松开任其自由滑动一段距离两种状态。
问题
- 使用触摸板触发事件,由于系统的平滑处理,会触发多次事件。
- IE 下无法使用触摸板触发该事件。?(有待验证)
error
参考
No categories