在 jQuery 动画期间获取实际的 div 高度
我有一些动画图表。这很酷。但我需要在动画期间将 div 的当前高度写入另一个 div(如模拟计时器)。我也有起始高度和最终高度。 因此,也许一种棘手的方法是可以的,即在动画本身单独进行的同时进行连续写出。不幸的是,我也不知道这样做。 谢谢!
I have some animated graphs. It's cool. But I need to write out the current height of the div to another div during the animation (like an analogue timer). I have the starting and the final height, too.
So, maybe a tricky method is OK, where a continuous write out is happening while the animation itself, separately. Unfortunately, I have no idea to do this neither.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用记录不足的 animate step 函数 (演示):
Use the under-documented animate step function (demo):
使用 jquery 尝试此操作,
您必须将其附加到您的动画代码中,但由于您没有发布它,所以我无法猜到!
Try this using jquery
you'll have to append it to your animations code, but as you didn't post it I can't guess it!