简体   繁体   中英

How to change the color of a progress bar

I want to change the color of the last update text , by default it is black , is there a way to introduce some code to change the text color as i made for the bar text? Help me to introduce the code that is missing.

<div id="progress">
    <span id="percent">2%</span>
    <div id="bar"></div>
    </div>
Last updated: 7/01/2013
#progress{
 width: 500px;   
 border: 1px solid orange;
 position: relative;
 padding: 1px;
}

#percent {
 position: absolute;   
 left: 50%;
 color:#C3B004; 
}

#bar {
 height: 20px;
 background-color:#2CB032;
 width: 2%;
}

Here is the link for the bar : link

I assume you can wrap the Last updated: 7/01/2013 in <span> tags, and give it a class, then you can style it however you want.

<span class="updated">Last updated: 7/01/2013</span>

CSS:

.updated {
    font-size: 12px;    //size
    color: green;       //colour
    font-family:"Arial" //font 
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM