简体   繁体   English

如何为Javascript中的线条绘制动画

[英]How do I animate drawing a line in Javascript

I am trying to animate the drawing of a simple line from one point within an html element to another. 我正在尝试使从html元素中的一个点到另一点的一条简单线的绘制动画。 The animation should be slightly slow (maybe taking like one second to reach the second point, but also customizable). 动画应该稍微慢一点(也许花一秒钟就可以到达第二点,但也可以自定义)。 I have been searching for the last couple of hours and have yet to find a single javascript library that does this for you. 我一直在搜索最近几个小时,但还没有找到一个可以为您完成此操作的JavaScript库。 Anyone found or know of anything for this? 有人发现或知道任何东西吗? Thanks, 谢谢,

Check out this javascript library. 看看这个 javascript库。 There are also some examples in there 那里也有一些例子

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM