CSS Progress Bar

<!DOCTYPE html>
<html>
<head>
  <style>
.progress {
  background: #ddd;
  border-radius: 20px;
  overflow: hidden;
  width: 300px;
  height: 25px;
}
.progress-bar {
  width: 70%; /* progress value */
  height: 100%;
  background: linear-gradient(to right, green, lime);
  text-align: center;
  color: white;
  line-height: 25px;
}
</style> </head> <body> <div class="progress">
&lt;div class="progress-bar"&gt;70%&lt;/div&gt;
</div> </body> </html>

Explanation:

  • A container with a colored bar inside.
  • Can be styled with gradients.

Comments

Leave a Reply

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