3

I have created a few Velocity.js animations that work well on a laptop using Chrome, Safari and Firefox, however, the animations sometimes crash or don't appear on my ipad2. Due to the fact that it sometimes works, leads me to believe its my ipad2. My question, is it possible to disable animations for ALL mobile devices, so they would display non-animated content?

Am assuming this would need to be done via JavaScript??

Thanks in advance!

4

1 回答 1

3

您可以使用 Velocity 的mock,请参阅 docs属性强制所有动画的持续时间和延迟为 0。只是为了演示这个想法,例如:

Velocity.mock = /iPad|iPod/.test(window.navigator.userAgent);

但是,如果您可以将中断动画最小化到 jsFiddle/codepen/jsbin/etc 上的单独测试中,并且如果您在 Velocity repo 的问题跟踪器上看到问题报告它们,那也会很棒。

于 2014-10-05T10:14:15.337 回答