From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/api/mouseevent/movementx/index.html | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 files/zh-cn/web/api/mouseevent/movementx/index.html (limited to 'files/zh-cn/web/api/mouseevent/movementx') diff --git a/files/zh-cn/web/api/mouseevent/movementx/index.html b/files/zh-cn/web/api/mouseevent/movementx/index.html new file mode 100644 index 0000000000..084428207d --- /dev/null +++ b/files/zh-cn/web/api/mouseevent/movementx/index.html @@ -0,0 +1,103 @@ +--- +title: MouseEvent.movementX +slug: Web/API/MouseEvent/movementX +translation_of: Web/API/MouseEvent/movementX +--- +

{{APIRef("DOM Events")}}

+ +

 MouseEvent.movementX 是只读属性,它提供了当前事件和上一个{{event("mousemove")}}事件之间鼠标在水平方向上的移动值。换句话说,这个值是这样计算的 : currentEvent.movementX = currentEvent.screenX - previousEvent.screenX.

+ +

语法

+ +
var xShift = instanceOfMouseEvent.movementX
+
+ +

返回值

+ +

一个数字

+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Pointer Lock','#widl-MouseEvent-movementX','MouseEvent.movementX')}}{{Spec2('Pointer Lock')}}Initial definition
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(22.0)}} {{property_prefix("webkit")}}
+ {{CompatChrome(37.0)}} unprefixed
{{CompatVersionUnknown}} +

{{CompatGeckoDesktop(1.0)}} {{property_prefix("moz")}}
+ {{CompatGeckoDesktop(41)}}

+
{{ CompatNo() }}{{ CompatUnknown() }}{{ CompatNo() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatChrome(37)}}{{CompatVersionUnknown}}{{CompatGeckoMobile(1.0)}} {{property_prefix("moz")}}
+ {{CompatGeckoMobile(41)}}
{{ CompatNo() }}{{ CompatUnknown() }}{{ CompatNo() }}{{CompatVersionUnknown}} {{property_prefix("webkit")}}
+ {{CompatChrome(37.0)}} unprefixed
+
+ +

相关

+ + -- cgit v1.2.3-54-g00ecf