這篇文章主要介紹bootstrap設(shè)置進(jìn)度條的方法,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
成都創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比潁上網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式潁上網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋潁上地區(qū)。費(fèi)用合理售后完善,10年實(shí)體公司更值得信賴。1、實(shí)現(xiàn)方法如下:
(1)引入bootrap文件:
<link rel="stylesheet" href="../libs/bootstrap-3.3.7/css/bootstrap.css">
(2)添加一個(gè)<div class="progress">;
(3)在<div class="progress">中添加一個(gè)<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>
以上是實(shí)現(xiàn)一個(gè)默認(rèn)進(jìn)度條,底色的灰色,進(jìn)度顏色是藍(lán)色,我們還可以在默認(rèn)進(jìn)度條的基礎(chǔ)上,通過加入不同的樣式來實(shí)現(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>
3、條紋狀,通過在根div添加 progress-striped 即可
<div class="progress progress-striped"> <div class="progress-bar progress-bar-success" style="width: 90%;"> </div> </div>
4、在根div 添加active,即可實(shí)現(xiàn)帶動(dòng)畫的進(jìn)度條?! ?/p>
<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)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)網(wǎng)站制作公司行業(yè)資訊頻道!
本文名稱:bootstrap設(shè)置進(jìn)度條的方法-創(chuàng)新互聯(lián)
網(wǎng)頁URL:http://jinyejixie.com/article18/coshgp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App開發(fā)、網(wǎng)站排名、虛擬主機(jī)、定制網(wǎng)站、營(yíng)銷型網(wǎng)站建設(shè)、建站公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容