<div class="loading">
<div class="progress">
<div class="progress_bar">
</div>
<div id="prog_status">
Loading...
</div>
</div>
</div>
body{
margin: 0;
padding: 0;
background: #333843;
}
.loading{
position: absolute;
top: calc(50% - 12px);
top: calc(50% - 12px);
left: calc(50% - 145px);
left: calc(50% - 145px);
}
#progress_message{
display: block;
background: rgba(40,43,52,0.9);
box-shadow: 0 5px 10px #000;
position: absolute;
top: 0px;
left: 347px;
width: 300px;
height: 60px;
z-index: 201;
font-family: Arial;
font-weight: bold;
color: #fff;
font-size: 14px;
text-shadow: 0 1px 0 #000;
padding: 10px;
padding-top: 15px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
.progress{
width: 290px;
height: 28px;
border-radius: 2px;
background: #20222A;
padding: 3px;
margin: 0;
border: 1px solid #1A1C21;
box-shadow: inset 0 0 3px #222, 0 1px 0 #484848;
}
.progress_bar{
width: 0;
height: 25px;
border-radius: 3px;
border: 1px solid #2A2B2F;
background: rgb(54,168,233); /* Old browsers */
background: linear-gradient(top, rgba(54,168,233,1) 0%, rgba(17,126,210,1) 100%); /* FF3.6+ */
background: gradient(linear, left top, left bottom, color-stop(0%,rgba(54,168,233,1)), color-stop(100%,rgba(17,126,210,1))); /* Chrome,Safari4+ */
background: linear-gradient(top, rgba(54,168,233,1) 0%,rgba(17,126,210,1) 100%); /* Chrome10+,Safari5.1+ */
background: linear-gradient(top, rgba(54,168,233,1) 0%,rgba(17,126,210,1) 100%); /* Opera 11.10+ */
background: linear-gradient(top, rgba(54,168,233,1) 0%,rgba(17,126,210,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(54,168,233,1) 0%,rgba(17,126,210,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#36a8e9', endColorstr='#117ed2',GradientType=0 ); /* IE6-9 */
box-shadow: inset 0 1px 0 #4dc8db, 0 1px 0 #393C45;
padding: 0;
margin: 0;
}
#prog_status{
position: absolute;
top: 10px;
left: 0px;
width: 100%;
text-align: center;
color: #fff;
font-weight: bold;
font-size: 12px;
font-family: Arial;
text-shadow: 0 -1px 0 #191A1E;
}
$(document).ready(function(){
animate();
});
function animate(){
$(".progress_bar").width("0px");
$(".progress_bar").animate({
width: '99%'
}, 6000, function(){setTimeout('animate()',2500);});
}
This Pen doesn't use any external CSS resources.