这是一款基于Bootstrap制作的超酷彩色斑马线条纹进度条设计效果。该进度条动画特效通过简单的CSS3 animation动画来完成,整个进度条设计时尚大方。
在页面中引入bootstrap.css文件。
1 |
HTML结构
该Bootstrap进度条的HTML结构如下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | < div class = "container" > < div class = "row" > < div class = "col-md-offset-3 col-md-6" > < div class = "progress" > < div class = "progress-bar progress-bar-info progress-bar-striped active" style = "width: 85%;" > < div class = "progress-value" >85%</ div > </ div > </ div > < div class = "progress" > < div class = "progress-bar progress-bar-success progress-bar-striped active" style = "width: 75%;" > < div class = "progress-value" >75%</ div > </ div > </ div > < div class = "progress" > < div class = "progress-bar progress-bar-warning progress-bar-striped active" style = "width: 90%;" > < div class = "progress-value" >90%</ div > </ div > </ div > < div class = "progress" > < div class = "progress-bar progress-bar-danger progress-bar-striped active" style = "width: 60%;" > < div class = "progress-value" >60%</ div > </ div > </ div > </ div > </ div > </ div > |
CSS样式
为该Bootstrap进度条添加如下的CSS样式。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | .demo{ padding : 2em 0 ; background : linear-gradient(to right , #2c3b4e , #4a688a , #2c3b4e ); } .progress{ height : 25px ; background : #262626 ; padding : 5px ; overflow : visible ; border-radius: 20px ; border-top : 1px solid #000 ; border-bottom : 1px solid #7992a8 ; margin-top : 50px ; } .progress .progress-bar{ border-radius: 20px ; position : relative ; animation: animate-positive 2 s; } .progress .progress-value{ display : block ; padding : 3px 7px ; font-size : 13px ; color : #fff ; border-radius: 4px ; background : #191919 ; border : 1px solid #000 ; position : absolute ; top : -40px ; right : -10px ; } .progress .progress-value:after{ content : "" ; border-top : 10px solid #191919 ; border-left : 10px solid transparent ; border-right : 10px solid transparent ; position : absolute ; bottom : -6px ; left : 26% ; } .progress-bar.active{ animation: reverse progress-bar-stripes 0.40 s linear infinite, animate-positive 2 s; } @-webkit-keyframes animate-positive{ 0% { width : 0 ; } } @keyframes animate-positive{ 0% { width : 0 ; } } |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com