jQuery 缓解 javascript 位置问题
我已经在 http://jsfiddle.net/GxpSQ/ 上发布了一个代码,其中包含工作代码。单击该框,它将随机播放。
基于hungred.com
我的代码基于此示例http://hungred.com/wp-content/demo/jQuery-Shuffle-effect/demo.html
问题
将我的效果与hungred.com 进行比较。我的效果会“闪烁”,因为盒子在返回之前没有走出足够远。
在设置index-z 之前,hungred.com 上的框会在开放空间中熄灭。这也是我想要的。我错过了什么?
I have posted a code on http://jsfiddle.net/GxpSQ/ with a working code. Click the box and it will shuffle.
Based on hungred.com
I based my code on this example http://hungred.com/wp-content/demo/jQuery-Shuffle-effect/demo.html
The problem
Compare my effect with hungred.com. My effect will "blink" because the box does not go out far enough before it returns.
The box on hungred.com goes out in the open space BEFORE index-z is set. That is what I want as well. What did I miss?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个带有自定义步骤函数的变体,它在中间设置了
zIndex
当动画元素处于缓动的“结束”阶段时。无闪烁!
http://jsfiddle.net/Dgfcy/
Here's a variant with a custom step function, that sets
zIndex
in the middle of the animation, when the animated element is in the "out" phase of the easing.No flicker!
http://jsfiddle.net/Dgfcy/
只需将另一个动画链接到现有动画,例如 this
Just chain up one more animate to existing animate like this