本文介绍了进度条摆动效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 摆动垂直进度条 我学会了如何构建一个整洁,动态大小 我的进步 解决方案所以这里是我的 JSFiddle 它。 评论应该是自我解释的。我不得不通过缓动为动画效果添加JQuery UI。我不确定你的意思 random ,但速度应该是你需要改变的全部。 对不起,截图中没有动画。 Wobbling Vertical Progress BarI learned how to build a neat, dynamically sized vertical progress bar with cross-bars in This Question.Now, I want to make it fun!The bar's wobble function should:take 4 parameters: element , height , speed , & randomwobble the element height percentage with a customizable, randomized factorkeep track of the elements's true height, which can change at any time!use an event (in the Fiddle, I supply an input and button) to set the true height to a new value, and animate to that height.Bonus:change the bars's background color value based on the bar's true height. Red is 0%, Yellow is 50%, and Green is 100%;Template FiddleMy Progress 解决方案 So here's my JSFiddle take on it.Comments should be self explanatory. I had to add JQuery UI for the animation effects with easing. I'm not sure what you meant by random, but speed should be all you need to change. Sorry, no animation in the screenshots. 这篇关于进度条摆动效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-03 04:50