简体   繁体   English

通过css或js的进度条动画?

[英]Progress bar animation via css or js?

I would like to create a progress bar animation but I am undecided if it is better to realize it via css or js, how they do it in here? 我想创建一个进度条动画,但是我不确定是否最好通过CSS或JS实现它,他们如何在这里实现呢? I am looking for a similar effect. 我正在寻找类似的效果。 http://goodlife.fuelthemes.net/2015/10/12/until-dawn-review/ http://goodlife.fuelthemes.net/2015/10/12/until-dawn-review/

is this the code they're using? 这是他们使用的代码吗? because I cannot reproduce the effect on my environment 因为我无法重现对环境的影响

topReviews: {
            selector: ".post-review .progress span",
            init: function() {
                var b = this
                  , c = a(b.selector);
                b.control(c),
                e.scroll(function() {
                    b.control(c)
                })
            },
            control: function(b) {
                var c = -1;
                b.filter(":in-viewport").each(function() {
                    var b = a(this)
                      , d = b.data("width");
                    c++,
                    setTimeout(function() {
                        TweenLite.to(b, 1, {
                            width: d + "%"
                        })
                    }, 200 * c)
                })
            }
        },

thanks 谢谢

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

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