Create Animated Skill Bar Using jQuery, HTML And CSS

Friday, Jan 27, 2017

Tags:- jQuery HTML CSS


Skill Bar is a modern way to give rating like if you want to compare mobile phones in terms of performance then skill bar is one of the best option to show performance rating in front of user there are number of ways to use this modern rating method skill bar.In this tutorial we will show you how to create animated skill bar using jQuery, HTML and CSS.You may also like animated progress bar using jquery.


See Demo
Create Animated Skill Bar Using jQuery, HTML And CSS


To Create Animated Skill Bar It Takes Only Two Steps:-

  1. Make a HTML file and define markup and scripting
  2. Make a CSS file and define styling


Step 1.Make a HTML file and define markup and scripting

We make a HTML file and save it with a name skill_bar.html

<html>
<head>
<link rel="stylesheet" type="text/css" href="skill_bar_style.css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	
$("#skillbar_php").animate({width:'85%'},1500);
$("#skillbar_asp").animate({width:'55%'},1500);
$("#skillbar_jsp").animate({width:'75%'},1500);

});
</script>
</head>
<body>
<div id="wrapper">

<div class="skill_name" id="skill_php">PHP</div>
<div class="skillbar_wrapper">
 <div class="skillbar_bar" id="skillbar_php"></div>
 <div class="skill_bar_percent">85%</div>
</div>

<div class="skill_name" id="skill_asp">ASP</div>
<div class="skillbar_wrapper">
 <div class="skillbar_bar" id="skillbar_asp"></div>
 <div class="skill_bar_percent">55%</div>
</div>

<div class="skill_name" id="skill_jsp">JSP</div>
<div class="skillbar_wrapper">
 <div class="skillbar_bar" id="skillbar_jsp"></div>
 <div class="skill_bar_percent">75%</div>
</div>

</div>
</body>
</html>

In this step we create three skill bars for three different languages and then we define the skill bar percentage so that our skill bar will animated upto that percentage we wrap our skill bar div and skill bar percent div in a container called skillbar_wrapper this is very important because it gives a progress bar look which is needed.Then we document.ready function to animate the skill bar as per the define width.You may also like display progress bar on page load using jQuery.



Step 2.Make a CSS file and define styling

We make a CSS file and save it with a name skill_bar_style.css

body
{
 text-align:center;
 width:995px;
 margin:0 auto;
 padding:0px;
 font-family: "Myriad Pro","Helvetica Neue",Helvetica,Arial,Sans-Serif;
 background-color:#CED8F6;
}
#wrapper
{
 margin:0 auto;
 padding:0px;
 text-align:center;
 width:995px;
}
#wrapper h1
{
 margin-top:100px;
 font-size:55px;
 color:#2E64FE;
}
#wrapper h1 a
{
 color:#2E64FE;
 font-size:18px;
}
.skill_name 
{
 margin-left:250px;
 width:50px;
 height:40px;
 line-height:40px;
 font-weight:bold;
 font-size:13px;
 color:white;
 clear:both;
 float:left;
 border-radius:3px 0px 0px 3px;
}
#skill_php
{
 background-color:#088A85;
}
#skill_asp
{
 background-color:#5858FA;
}
#skill_jsp
{
 background-color:#04B404;
}
.skillbar_wrapper 
{
 float:left;
 position:relative;
 display:block;
 margin-bottom:15px;
 width:400px;
 background-color:#E6E6E6;
 height:40px;
 border-radius:0px 3px 3px 0px;
}
.skillbar_bar 
{
 height:40px;
 width:0px;
 border-radius:0px 3px 3px 0px;
}
#skillbar_php
{
 background-color:#01DFD7;
}
#skillbar_asp
{
 background-color:#8181F7;
}
#skillbar_jsp
{
 background-color:#01DF01;
}
.skill_bar_percent 
{
 position:absolute;
 right:10px;
 top:0;
 font-size:12px;
 height:35px;
 line-height:35px;
 color:black;
}

That's all, this is how to create animated skill bar using jQuery, HTML and CSS.You can customize this code further as per your requirement. And please feel free to give comments on this tutorial.

Subscribe Our Newsletter And Get Tutorials
And Offers Via Email

Subscribe Our Newsletter And Get Tutorials And Offers Via Email

About Me


Hello, My Name is Mudit Jain. I am a Web Developer, Professional Blogger and Digital Marketer from India. I am the founder of TalkersCode. I started this blog in february 2015 to help web developers & bloggers by providing easy and best tutorials, articles and offers for web developers and bloggers.