无法删除引导进度条中的边框

时间:2015-11-15 16:05:11

标签: html css twitter-bootstrap

我已经开始使用自定义颜色等创建bootstrap进度条。但是在进度条上方出现灰色边框,我无法理解此边框的来源以及如何将其删除。

CSS:

.progress-info {
    color: #ffffff;
}
.progress-info {
    padding-top: 34px;
    background-color: #005861;
}
.progress {
    background-color: #F3723F;
    border: 5px solid #F3723F;
    border-radius: 4px;
    height: 18px;
}
.progress-second {
    background-color: #45BDA1;
    border: 5px solid #45BDA1;
}

HTML:

<div class="progress-info" data-bind="with: $data.statistics">
    <div class="row">
        <div class="col-md-4">Your score</div>
        <div class="progress col-md-6">
            <div class="progress-bar progress-bar-score" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-bind="style: {width: $data.score}" style="width: 6%;"></div>
        </div>
        <div class="col-md-2" data-bind="text: $data.score">6%</div>
    </div>
    <div class="row">
        <div class="col-md-4">Progress</div>
        <div class="progress progress-second col-md-6">
            <div class="progress-bar progress-bar-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-bind="style: {width: $data.score}" style="width: 6%;"></div>
        </div>
        <div class="col-md-2"><span data-bind="text: $data.success_cnt">2</span>&nbsp;/&nbsp;<span data-bind="text: $data.attempts">35</span>
        </div>
    </div>
</div>

enter image description here

JsFiddle

1 个答案:

答案 0 :(得分:1)

那不是border。这是box-shadow。您只需将box-shadow: none;提供给.progress

Jsfiddle

.progress {
    height: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
    box-shadow: none;
}