定义进度条,指示进度。
要应用此组件,请将.uk-progress
class 添加到 <progress>
元素。
<progress class="uk-progress" value="" max=""></progress>
<progress id="js-progressbar" class="uk-progress" value="10" max="100"></progress>
<script>
UIkit.util.ready(function () {
var bar = document.getElementById('js-progressbar');
var animate = setInterval(function () {
bar.value += 10;
if (bar.value >= bar.max) {
clearInterval(animate);
}
}, 1000);
});
</script>