1 位贡献者:


Note: Gecko doesn't have a plan to implement this event due to legacy event type and non-standard.

The DOM mousewheel event is fired asynchronously when mouse wheel or similar device is operated. It's represented by the MouseWheelEvent interface.

  • Interface :MouseWheelEvent
  • Synchronicity :asynchronous
  • Bubbles : yes (Though, MSDN documents "No")
  • Target : Element, Document, Window
  • Cancelable : yes (Though, MSDN documents "No")
  • Default action : Scroll, moving history, or zooming in/out


The document in MSDN: onmousewheel event

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) Not supported 6.0 (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? Not supported ? ? ?

wheelDelta value

The wheelDelta attribute value is abstract value which indicates how far the wheel turned. If the wheel has rotated away from the user, it's positive. Otherwise, negative.  This means that the delta value sign is different from DOM Level 3 Events' wheel.

On either IE or WebKit on Windows: The value is multiplies of 120 when the user is using a wheel with notches and its driver doesn't support high resolution scrolling.  Otherwise, could be smaller than 120.

On Opera on Windows: The value is multiplies of 40 per line.  If the scroll speed is 3 lines per notch (default setting on Windows), this value becomes same as IE and WebKit.

Horizontal wheel operation

Neither IE nor Opera fires this event by horizontal wheel operation.  On the other hand, WebKit fires it for horizontal wheel operation too.

See also


 此页面的贡献者: ziyunfei
 最后编辑者: ziyunfei,