HTML5 Progress Bar

By | July 24, 2014

HTML5 Progress Bar will be used to minimize the html coding. <progress> tag is used to make progress bar.

Below is the progress bar syntax and example. The parameter max is the maximum value for the progress bar and parameter value is the percentage out of maximum value.

 

 

[code type=html]

<progress value=”40″ max=”100″></progress>

[/code]

Giving appearance of progress[value] as none will able to give css properties to progress bar and progress value.
-webkit-appearance: none; 

CSS Code for Progress Bar

[code type=css]

<style type=”text/css”>

progress[value]
{
width: 600px;
height: 120px;
-webkit-appearance: none;
}
/*** Progress Bar ****/
progress[value]::-webkit-progress-bar
{
background-color: #900;
}
progress[value]::-moz-progress-bar
{
background-color: #900;
}

/*** Progress Value ****/
progress[value]::-webkit-progress-value
{
background-color: #ccc;
}
progress[value]::-moz-progress-value
{
background-color: #ccc;
}

</style>

[/code]

Leave a Reply

Your email address will not be published. Required fields are marked *

find-veranda