1.Boorstrap进度条

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Bootstrap进度条</title>
    <!--width=device-width 表示宽度是设备屏幕的宽度。
        initial-scale=1 表示初始的缩放比例。
        shrink-to-fit=no 自动适应手机屏幕的宽度。-->
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="../css/bootstrap.css">
    <style type="text/css">
    </style>
</head>
<body>
<div class="jumbotron text-center">
    <h1>Bootstrap进度条</h1>
</div>
<div class="container">
    <div class="progress">
        <div class="progress-bar progress-bar-striped progress-bar-animated" id="s-progress" style="width: 0%">
        </div>
    </div>
</div>
<script type="text/javascript">
    var num = 10;
    const progressFlag = setInterval(function () {
        num += 10;
        let progressElement = document.getElementById("s-progress");
        progressElement.innerText = num + '%';
        progressElement.style.width = num + '%'
    }, 3000);

    setTimeout(function () {
        window.clearInterval(progressFlag)
    }, 27000)
</script>
</body>
</html>