El título explica exactamente lo que necesito. Pero simplemente quiero colocar esto como una especie de widget en una de mis páginas, y quiero que el cargador dirija la página a otra URL una vez que termine de cargarse. Retrasaré la velocidad del cargador más tarde. Esperemos que esto no sea una tarea tan difícil. Ayúdame. Gracias.
Aquí está el violín https://jsfiddle.net/kimmobrunfeldt/k5v2d0rr/
También puse el Javascript abajo:
var bar = new ProgressBar.Line(container, { strokeWidth: 4, easing: 'easeInOut', duration: 1400, color: '#FFEA82', trailColor: '#eee', trailWidth: 1, svgStyle: {width: '100%', height: '100%'}, text: { style: { // Text color. // Default: same as stroke color (options.color) color: '#999', position: 'absolute', right: '0', top: '30px', padding: 0, margin: 0, transform: null }, autoStyleContainer: false }, from: {color: '#FFEA82'}, to: {color: '#ED6A5A'}, step: (state, bar) => { bar.setText(Math.round(bar.value() * 100) + ' %'); } }); bar.animate(1.0); // Number from 0.0 to 1.0Aquí está el CSS
#container { margin: 20px; width: 400px; height: 8px; position: relative; }Y aquí está el html
<div id="container"></div>