大网数据广告活动
Web 标准与前端开发

Force Touch events

· 52CE 我爱测

Force Touch events** are a proprietary, Apple-specific feature which makes possible (where supported by the input hardware) new interactions based on how hard the user clicks or presses down on the touchscreen or trackpad.

Force Touch events

Force Touch events are a proprietary, Apple-specific feature which makes possible (where supported by the input hardware) new interactions based on how hard the user clicks or presses down on the touchscreen or trackpad.

事件

  • Element/webkitmouseforcewillbegin_event
    • : This event is fired before the Element/mousedown_event event. Its main use is that it can be Event.preventDefault()ed.
  • Element/webkitmouseforcedown_event
    • : This event is fired after the Element/mousedown_event event as soon as sufficient pressure has been applied for it to qualify as a "force click".
  • Element/webkitmouseforceup_event
    • : This event is fired after the Element/webkitmouseforcedown_event event as soon as the pressure has been reduced sufficiently to end the "force click".
  • Element/webkitmouseforcechanged_event
    • : This event is fired each time the amount of pressure changes. This event first fires after the Element/mousedown_event event and stops firing before the Element/mouseup_event event.

事件属性

The following property is known to be available on the Element/webkitmouseforcewillbegin_event, Element/mousedown_event, Element/webkitmouseforcechanged_event, Element/webkitmouseforcedown_event, Element/webkitmouseforceup_event, Element/mousemove_event, and Element/mouseup_event event objects:

  • MouseEvent.webkitForce
    • : 当前施加于触控板/触摸屏的压力大小

常量

这些常数对于确定由 MouseEvent.webkitForce 指示的压力的相对强度是有用的:

  • MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN
    • : 正常点击所需的最小力量
  • MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN
    • : 强制点击所需的最小力量

规范

*不是任何规格的一部分。*苹果在 Mac 开发者图书馆有一个描述。

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。