How to create a skill bar with CSS?

CSSWeb DevelopmentFront End Technology

To create a skill bar with CSS, the code is as follows −

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
   * {
      box-sizing: border-box;
   }
   body {
      font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
   }
   h1 {
      text-align: center;
   }
   .container {
      width: 100%;
      background-color: rgb(231, 231, 231);
      border-radius: 20px;
   }
   .cpp, .java, .python, .c {
      text-align: center;
      font-weight: bolder;
      padding-top: 3px;
      padding-bottom: 3px;
      color: white;
      border-radius: 20px;
   }
   .cpp {
      width: 90%;
      background-color: #4caf50;
   }
   .java {
      width: 80%;
      background-color: #2196f3;
   }
   .python {
      width: 65%;
      background-color: #f44336;
   }
   .c {
      width: 60%;
      background-color: #808080;
   }
</style>
</head>
<body>
<h1>Programming Proficiency</h1>
<h3>Python</h3>
<div class="container">
<div class="python">75%</div>
</div>
<h3>Java</h3>
<div class="container">
<div class="java">70%</div>
</div>
<h3>C++</h3>
<div class="container">
<div class="cpp">60%</div>
</div>
<h3>C</h3>
<div class="container">
<div class="c">40%</div>
</div>
</body>
</html>

Output

The above code will produce the following output −

raja
Published on 07-May-2020 14:32:57
Advertisements