Animated Radial Progress Bar With jQuery And CSS3
| File Size: | 3.43 KB |
|---|---|
| Views Total: | 11797 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
A customizable, circular, CSS3 animated progress bar plugin for jQuery that can be used to display progress, completion, percentage, loading status, etc.
How to use it:
1. Create a placeholder element for the progress bar and config the plugin with the following data attributes:
- data-percent: Percentage value
- data-duration: Duration of animation
- data-color: Background/progress colors
<div class="progress-bar-demo"
data-percent="20"
data-duration="1000"
data-color="#ccc,yellow">
</div>
2. The required CSS/CSS3 rules for the progress bar.
.progress-bar1 div {
position: absolute;
height: 100px;
width: 100px;
border-radius: 50%;
}
.progress-bar1 div span {
position: absolute;
font-family: Arial;
font-size: 25px;
line-height: 75px;
height: 75px;
width: 75px;
left: 12.5px;
top: 12.5px;
text-align: center;
border-radius: 50%;
background-color: white;
}
.progress-bar1 .background { background-color: #b3cef6; }
.progress-bar1 .rotate {
clip: rect(0 50px 100px 0);
background-color: pink;
}
.progress-bar1 .left {
clip: rect(0 50px 100px 0);
opacity: 1;
background-color: hotpink;
}
.progress-bar1 .right {
clip: rect(0 50px 100px 0);
transform: rotate(180deg);
opacity: 0;
background-color: #4b86db;
}
@keyframes
toggle { 0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
3. Insert jQuery JavaScript library and the jQuery Progressbar.js into the html page.
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous">
</script>
<script src="jQuery-plugin-progressbar.js"></script>
4. Initialize the plugin to animate the progress bar to 20%.
$(".progress-bar-demo").loading();
5. You can also customize the progress bar in the JavaScript as this:
$(".progress-bar-demo").loading({
backgroundColor: '#b3cef6',
progressColor: '#4b86db',
percent: 75,
duration: 2000
});
This awesome jQuery plugin is developed by DulcePC. For more Advanced Usages, please check the demo page or visit the official website.











