I am trying to achieve a loading effect on the page load by CSS3 width transition. Here is the demo.
HTML
You can achieve the effect without JavaScript and without any compatibility issue using CSS animation:
.skill-bar {
width: 57%;
float: left;
height: 11px;
border-radius: 5px;
position: relative;
margin: 6px 0 12px 0;
border: 2px solid #00edc2;
}
.skill-bar span {
background: #00edc2;
height: 7px;
border-radius: 5px;
display: inline-block;
}
.skill-bar span {
animation: w70 1s ease forwards;
}
.skill-bar .w70 {
width: 70%;
}
@keyframes w70 {
from { width: 0%; }
to { width: 70%; }
}
Fiddle for webkit: http://jsfiddle.net/ySj7t/