JavaScript/wheel:修订间差异
来自康健生活
| (未显示同一用户的3个中间版本) | |||
| 第137行: | 第137行: | ||
[[Prototype]]: WheelEvent | [[Prototype]]: WheelEvent | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
双指<code>放大/缩小</code>,只有 <code>ctrlKey</code> 值为 <code>true</code>,并且几乎只有 <code>deltaY</code> 发生变化,放大时 <math>deltaY < 0</math>,缩小时 <math>deltaY > 0</math>。 | |||
===== 实现 ===== | |||
=== 监听 wheel 结束 === | |||
== 属性 == | == 属性 == | ||
| 第149行: | 第152行: | ||
* 使用触摸板触发事件,由于系统的平滑处理,会触发多次事件。 | * 使用触摸板触发事件,由于系统的平滑处理,会触发多次事件。 | ||
* IE 下无法使用触摸板触发该事件。{{Qm|有待验证}} | * IE 下无法使用触摸板触发该事件。{{Qm|有待验证}} | ||
== 滚动事件参考 == | |||
<pre> | |||
事件 浏览器 | |||
wheel Chrome(31+), FF(17+), IE(9+) | |||
mousewheel Chrome, IE(6+), Opera, Safari | |||
MozMousePixelScroll FF(3.5 only!) (2010-2013) | |||
DOMMouseScroll FF(0.9.7+) since 2003 | |||
</pre> | |||
== error == | == error == | ||