定義進度條,以指示流程的進度。
要應用此元件,請將 .uk-progress
類別添加到 <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>