若要制作一个条纹进度条,我们应该把.bar-fill重新命名为.bar-fill-stripes。我们将使用backgrou-image属性里的 linear-gradient同时声明它的颜色。剩余的CSS3动画效果也是和上述相同,看下面的代码:
.bar-fill-stripes {
height:15px
display:block
background:#e74c3c
width:0
border-radius:8px
background-image:linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent)
-webkit-transition:width .8s ease
-moz-transition:width .8s ease
transition:width .8s ease
-webkit-animation:progressbar 7s infinite
animation:progressbar 7s infinite
}