📜  ProgressBar 从颜色到颜色 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:10.858000             🧑  作者: Mango

代码示例1
var bar = new ProgressBar.Line('#container', {
    step: function(state, bar, attachment) {
        bar.path.setAttribute('stroke', state.color);
    }
});

var opts = {
    from: { color: '#000 '},
    to: { color: '#888'}
};
bar.animate(0.5, opts);