Progress Bar Animation
HTML CODE:-
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title></title> </head> <body> <div class="container"> <h1>Skills</h1> <div class="box"> <h4>Java</h4> <div class="progress"> <div class="percent" style="width:90%">90%</div> </div> </div> <div class="box"> <h4>Python</h4> <div class="progress"> <div class="percent" style="width:80%">80%</div> </div> </div> <div class="box"> <h4>C++</h4> <div class="progress"> <div class="percent" style="width:70%">70%</div> </div> </div> </div> </body> </html> |
CSS CODE:-
body{ padding: 0px; margin: 0px; display: flex; align-items: center; justify-content: center; min-height: 100vh; background: black; } .container{ position: relative; width: 500px; color: white; } h1{ text-align: center; } .box{ position: relative; width: 100%; margin-bottom: 20px; } .progress{ width: 100%; height: 20px; border: 2px solid white; border-radius: 20px; text-align: center; line-height: 20px; overflow: hidden; } .percent{ text-align: right; color: white; padding-right: 10px; border-right: 2px solid white; background: linear-gradient(45deg,white 25%,transparent 25%,transparent 50%, white 50%, white 75%,transparent 75%,transparent); background-size: 30px 30px; animation: animate .5s linear infinite; } @keyframes animate{ 0%{ background-position: 0 0; } 100%{ background-position: 50px 0; } } |