简体   繁体   中英

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? I am looking for a similar effect. 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

<div id="myProgress">
  <div id="myBar"></div>
</div>

http://www.w3schools.com/howto/howto_js_progressbar.asp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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