set text in progress bar centered

This commit is contained in:
MaysWind 2016-05-19 00:08:51 +08:00
parent 347be6695d
commit f4678ad234
2 changed files with 16 additions and 2 deletions

View file

@ -301,6 +301,20 @@ td {
font-size: 12px; font-size: 12px;
} }
.task-table .progress {
position: relative;
}
.task-table .progress span {
position: absolute;
display: block;
width: 100%;
}
.task-table .progress span.progress-lower {
color: #000;
}
/* settings-table */ /* settings-table */
.settings-table { .settings-table {
margin-left: 15px; margin-left: 15px;

View file

@ -49,8 +49,8 @@
<div class="progress-bar progress-bar-primary" role="progressbar" <div class="progress-bar progress-bar-primary" role="progressbar"
aria-valuenow="{{task.completePercent}}" aria-valuemin="1" aria-valuenow="{{task.completePercent}}" aria-valuemin="1"
aria-valuemax="100" style="width: {{task.completePercent}}%;"> aria-valuemax="100" style="width: {{task.completePercent}}%;">
<div ng-class="{'lower': task.completePercent < 50}" <span ng-class="{'progress-lower': task.completePercent < 50}"
ng-bind="(task.completePercent | percent: 2) + '%'"></div> ng-bind="(task.completePercent | percent: 2) + '%'"></span>
</div> </div>
</div> </div>
<div> <div>