进度条去除灰色

时间:2014-02-17 01:23:54

标签: html5 css3 progress-bar

我不确定是否可能。但我正在尝试删除此进度条的灰色区域:

enter image description here

progress, progress[role] {
    border: none;
    background-size: auto;
    height: 24px;
    background-color: green;
    width: 100%;
}
.skill-list {
    list-style: none;
    margin: 0;
    padding: 1em;
}
.skill {
    margin-bottom: 1em;
    position: relative;
}
.skill h5 {
    color: #fff;
    left: 1em;
    line-height: 1;
    position: absolute;
    top: -10px;
    text-transform: uppercase;
}
.skill ::-webkit-progress-value {
    -webkit-animation: bar-fill 2s;
    width: 0px;
}
.skill-1::-webkit-progress-value {
    background: #ff9e2c;
    border-radius: 5px;
}
.skill-1::-moz-progress-bar {
    background: #ff9e2c;
    border-radius: 5px;
}
.skill-2::-webkit-progress-value {
    background: #4ecdc4;
    border-radius: 5px;
}
.skill-2::-moz-progress-bar {
    background: #4ecdc4;
}
.skill-3::-webkit-progress-value {
    background: #ff6b6b;
    border-radius: 5px;
}
.skill-3::-moz-progress-bar {
    background: #ff6b6b;
    border-radius: 5px;
}
@-webkit-keyframes bar-fill {
    0% {
        width: 50px;
    }
}
@keyframes bar-fill {
    0% {
        width: 50px;
    }
}

有可能吗?

1 个答案:

答案 0 :(得分:1)

只需添加以下内容:

progress[value]::-webkit-progress-bar {
  background-color: #FFF;
}

progress::-moz-progress-bar {
    background: #FFF;
}

示例:http://jsfiddle.net/WQ7ch/1/