- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
DeviceOrientation specification包括设备运动事件。我见过它在 iPhone 上运行,听说它在 Chrome Mac 中受支持并在 Google Jules Vern Doodle 上使用.
是否有任何其他浏览器实现支持它?它在哪些版本中可用?
最佳答案
支持 DeviceOrientation 或 DeviceMotion 是浏览器及其运行硬件的组合。 Windows 上的 Firefox 和 Chrome 在 API 方面都支持 DeviceOrientation,但不一定适用于任何特定硬件。 Firefox 支持 DeviceMotion,但 Windows 上的 Chrome 不支持。
在运行“lenovo airbag protection”的 lenovo thinkpad 上,Firefox 10 将提供 DeviceMotion 事件,但奇怪的是不会提供 DeviceOrientation 事件。此外,它提供的值似乎是错误的(即不是以 m/s/s 为单位测量的)。 v虽然 Chrome 有 DeviceOrientation API,但我无法让它提供事件。 Windows 上的 Opera 11.61 似乎不支持任何一个 API。 Safari 5.1.2 for windows 似乎也不支持。
这里有一个关于使用 DeviceMotionEvent 的优秀页面 http://www.html5rocks.com/en/tutorials/device/orientation/其中包括一个使用 DeviceOrientation 的演示和另一个使用 DeviceMotion 的演示。
关于javascript - DeviceMotionEvent 目前在哪里实现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5372083/
DeviceOrientation specification包括设备运动事件。我见过它在 iPhone 上运行,听说它在 Chrome Mac 中受支持并在 Google Jules Vern Do
这是我的完整代码: alert(!!window.DeviceMotionEvent); 在我的手机上,此页面警告“错误”。在我的
我的 Cordova 应用程序使用 DeviceMotionEvent.requestPermission() 函数来请求用户访问 iOS 设备方向的权限。但iOS生成的提示是: "" Would L
使用 Dart,我正在尝试访问 HTML 页面上的加速度计。使用陀螺仪没有问题,文档明确指出 DeviceOrientationEvent 具有 alpha、beta 和 gamma 属性,并且工作正
实现陀螺仪权限请求,但我在 requestPermission 上收到 typescript 错误 我的代码: if (typeof (DeviceMotionEvent) !== 'undefine
DeviceMotionEvent.requestPermission 在第一次使用时效果很好。如果用户在第一次取消对运动传感器的访问,则以后调用 requestPermission 函数时不会出现对
我正在尝试在我的网站上实现 DeviceOrientationEvent 和 DeviceMotionEvent 以获得 3D 效果。但是,控制台不会记录任何信息,显然 iOS 13 需要用户设置权限
我有一个查看 Action 事件的页面。出于某种原因,iOS 设备与 Android 设备(特别是 Galaxy S4)返回的值是不同的——本质上是相反的。 例如,如果 accelerationInc
我是一名优秀的程序员,十分优秀!