bootstrap設(shè)置進(jìn)度條的方法

這篇文章主要介紹bootstrap設(shè)置進(jìn)度條的方法,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!

專注于為中小企業(yè)提供網(wǎng)站制作、網(wǎng)站建設(shè)服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)慈溪免費做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動了上千余家企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設(shè)實現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。

1、實現(xiàn)方法如下:

(1)引入bootrap文件:

 <link rel="stylesheet" href="../libs/bootstrap-3.3.7/css/bootstrap.css">

(2)添加一個<div class="progress">;

(3)在<div class="progress">中添加一個<div class="progress-bar">

<div class="progress-bar" aria-valuenow="40" aria-valuemax="100" aria-valuemin="0" style="width:40%;">

aria-valuenow="40"——進(jìn)度條目前進(jìn)度值。

aria-valuemax="100"——最大進(jìn)度值。

aria-valuemin=“0”——最小進(jìn)度值。

style="width:40%;"——讓進(jìn)度條指在40%的位置。

完整代碼如下:

<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>進(jìn)度條</title>
    <link rel="stylesheet" href="../libs/bootstrap-3.3.7/css/bootstrap.css">
</head>
<body>
<div style="width: 600px">
    <p>默認(rèn)的進(jìn)度條</p>
    <div>
        <div aria-valuenow="40" aria-valuemax="100" aria-valuemin="0" style="width:40%;">
        </div>
    </div>
</div>
</body>
</html>

以上是實現(xiàn)一個默認(rèn)進(jìn)度條,底色的灰色,進(jìn)度顏色是藍(lán)色,我們還可以在默認(rèn)進(jìn)度條的基礎(chǔ)上,通過加入不同的樣式來實現(xiàn)豐富多彩的進(jìn)度條。

2、指定顏色.

progress-bar-success、progress-bar-info、progress-bar-warning、progress-bar-danger

<div class="progress">
    <div class="progress-bar progress-bar-success"style="width: 90%;">
    </div>
</div>
<div class="progress">
    <div class="progress-bar progress-bar-info" style="width: 30%;">
    </div>
</div>
<div class="progress">
    <div class="progress-bar progress-bar-warning" style="width: 20%;">
    </div>
</div>
<div class="progress">
    <div class="progress-bar progress-bar-danger" style="width: 10%;">
    </div>
</div>

bootstrap設(shè)置進(jìn)度條的方法

3、條紋狀,通過在根div添加 progress-striped 即可

<div class="progress progress-striped">
    <div class="progress-bar progress-bar-success" style="width: 90%;">
    </div>
   </div>

4、在根div 添加active,即可實現(xiàn)帶動畫的進(jìn)度條。

<div class="progress progress-striped active">
    <div class="progress-bar progress-bar-success" 
         style="width: 40%;">
    </div>
  </div>

以上是bootstrap設(shè)置進(jìn)度條的方法的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

文章標(biāo)題:bootstrap設(shè)置進(jìn)度條的方法
文章地址:http://bm7419.com/article0/ipdoio.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、網(wǎng)站建設(shè)、面包屑導(dǎo)航、品牌網(wǎng)站制作、關(guān)鍵詞優(yōu)化用戶體驗

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運營